on 07-29-2008 8:02 PM
Hello,
New to Crystal Reports... I have 2 existing reports, and I want to create a report that calculates a metric, using the results of the 2 reports, linked by the grouping that I used in each.
e.g.
- Report A from table 1 counts all shipments by date, grouped by month
- Report B from table 2 sums hours of network outage, grouped by month
I want to calculate (sum of hours outage)/(running total of shipments), and display graphically by month
Working with subreports, I have only been able to pass one single value to the main report, not all values by month to do the math
I would imagine this is a pretty simple task, I have done this using other tools, but have not found a simple way in Crystal Reports yet. Any help would be appreciated
Thanks,
Guests can't get credit for their answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael
When we want to create image or any calculation based off two diffrent values from two different tables,at that time we need to use subreport in Crystal Report.Below are the steps to resolve the issue.
1)In main Report inser section (For e.g. Page header A,Page Header B & Page header C)
2) Insert sub report a in page Header A ,Insert sub report b in page Header B.
In Sub report:Create a query as per requirement and stored it in Shared variable.Same for sub report B.
Now we have two sared variable value in main report.Using that values we can calculate for Hour based value.
Hope this will work.
Regards
Asha Lund
Design Engineer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Asha,
Thanks, this is helpful. But when I create the shared variables, I am still only passing a single value to the main report (the most recent value of the variable). Each subreport contains formulas to calculate values I need and lists them against a date/time. e.g.
Subreport A calcuates outage hours, and shows what datetime the outage started:
Hrs DateTime
Subreport B shows total shipments by datetime:
CountShipments DateTime
Hrs and CountShipments are the shared variables.
I want to divide Sum(Hrs)/(CountShipments) and graph for each month.
Any method of doing this that you are familiar with?
Try creating a seperate report for the graph that consist of both the tables linked and insert a chart by grouping on dates and then insert this report as a subreport in the existing report at footer level without any subreport links.
I Hope this could help you !
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.