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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sub reports to main report 1

Status
Not open for further replies.

Chuku

Programmer
Jun 9, 2011
25
US
Hi,
I have two subreports in which there are fields which need to be displayed in the main report.
Say,

A is the result which is obtained from a formula field in 1st report

B is the result which is obtained from a formula field in 2nd report

Now I need to compare A and B and display the minimum value in the main report.

Thanks in advance
 
Use a shared variable for each result. For a count
Code:
whileprintingrecords;
shared numbervar CountIt;
CountIt:={#TotCount};
CountIt
And to access it in the main report, create another formula field with
Code:
whileprintingrecords;
shared numbervar CountIt;
CountIt
Note that the shared variable is only available in the section after the section which contains the subreport.

You'll need to do separate shared variables for the two subreports, and then compare them. Best to display them first, to be sure everything is working.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top