Link to home
Start Free TrialLog in
Avatar of lemmohr
lemmohrFlag for Canada

asked on

Using the formula as a where clause

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?


Avatar of lemmohr
lemmohr
Flag of Canada image

ASKER

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

Avatar of peter57r
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
Avatar of lemmohr

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lemmohr

ASKER

yep! worked great! thanks again!