Solved

Using the formula as a where clause

Posted on 2010-11-10
5
432 Views
Last Modified: 2012-06-21
Hey Folks,
This is my first time posting here. I am pretty new to crystal reports but pretty well versed in the SQL language (t-sql, pl/sql, etc). I have this huge report that was passed off to me that I need to modify.

Example table:

Record      Type      Agent      Date
1001      NH      John      3/1/2010
1002      TER      Mary      4/1/2010
1003      TER      John      4/1/2010
1004      NH      Mary      3/1/2010
1005      NE      Jane      5/1/2010
1006      NE      Jane      6/1/2010
1007      NH      John      3/1/2010
1008      TE      Jane      5/1/2010
1010      TER      John      1/10/2010

Everything is good for the most of the report, but now i need to add a chart that would only display information for types NH and NE so I have created this code
{table} in ["NH","NE"] 

Open in new window

so that it would only capture NH and NE data.
I would need to count all NH and NE records
is my code correct?


0
Comment
Question by:lemmohr
  • 3
  • 2
5 Comments
 

Author Comment

by:lemmohr
ID: 34102043
i also want to add that I want to do an aggregate calculation for this 'sub query'. I want to add all records that have NH and NE types By Agent By Date

0
 
LVL 77

Expert Comment

by:peter57r
ID: 34102126
I think that using a subreport  that selects just those two types  would be the most straightforward approach (my immediate feeling is that it is the ONLY way- but I guess it might be possible to do some intricate conditional suppressions).

So create a bare-bones report that shows only the result you now want to see and add that as a subreport into the first report's report footer
0
 

Author Comment

by:lemmohr
ID: 34102196
thanks peter57r, I have also tried it and it worked perferct. another problem of mine is i need to copy this chart multiple times accross the report (let's say this is for each Agent's performance report, and manager needs to show this chart to all individuals, but without showing the other names)

is there anyway that you can have the same subreports show multiple times in a report?
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34102333
Sure.
You need to include the agent field in the subreport data set.
I assume that the main report would be grouped by agent, so add the subreport to the group footer (or group header) and link it to the main report using the agent fields.
Each instance of the subreport will just show the results for the one agent.
0
 

Author Comment

by:lemmohr
ID: 34102500
yep! worked great! thanks again!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Crystal Reports and Splitting a Product Code 15 67
Crystal Reports Swap Columns 2 51
Formatting a Crystal Reports Report 9 76
Crystal Report Date Range Parameters 2 51
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now