[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 443
  • Last Modified:

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?


0
lemmohr
Asked:
lemmohr
  • 3
  • 2
1 Solution
 
lemmohrAuthor Commented:
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
 
peter57rCommented:
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
 
lemmohrAuthor Commented:
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
 
peter57rCommented:
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
 
lemmohrAuthor Commented:
yep! worked great! thanks again!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now