Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing subreport elements 1

Status
Not open for further replies.

AvgMoJoe

Technical User
Nov 7, 2007
26
US
Scenario: I want to compare subreports for consistancy across multiple organizations.

Each Org has multiple ExamCodes. ExamCodes are consistant across Orgs (each have uniqueID though). Each ExamCode has multiple Charges. These should be consistant, but I know some are not.

I want to make sure that ExamCode 'ExamX' at Org 'OrgA' has the same charges as ExamCode 'ExamX' at Org 'OrgB' and Org 'OrgC'

I would like to display only those ExamCodes with ChargeCodes which are discrepent.

<group = ExamX>
OrgA ExamX
Charge1
Charge2
OrgB ExamX
Charge1
Charge2
ChargeZ
 
Please explain why you are using subreports. Are you working with more than one table? What are they?

Where are the subreports located (what report section?)?

-LB
 
I'd suggest another subreport. Access all of the ExamCodes for all the Orgs. Group by ExamCodes. Suppress group header and details. Show the group footer if the minimum and maximum for a particular charge are not the same.

You could do something with Shared Variables, but they are inconvenient if you have a lot of data.

As lbass says, best to avoid subreports when you can. But it's not possible to avoid them if you want to group the same data several different ways and Crosstab is not suitable.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
(Crystal 9)

2 Tables -
A view of All ExamCodes with corresponding Orgs
and a linked table (by ExamCode) of Charges
 
Please answer ALL questions. Thanks.

-LB
 
Oops sorry. I think I may be approaching it from the wrong angle. Currently I had an Exam report with subreports for ChargeCodes for each exam. I could instead grab both tables in a main report and use grouping. Just trying to figure out how to show only those exams from different orgs where the charge codes do not match.
 
You could link the tables by exam code and then group on exam code and organization and then go to report->selection criteria->GROUP and enter:

distinctcount({table.charge},{table.examcode}) <> distinctcount({table.charge},{table.organization})

This would return those organizations with missing charges, instead of those with "extra" charges, but would at least show the exam codes where there are discrepancies.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top