Solved

Using the formula as a where clause

Posted on 2010-11-10
5
431 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

12 Experts available now in Live!

Get 1:1 Help Now