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

Passing a variable from a subreport 1

Status
Not open for further replies.

VE

Technical User
Oct 25, 2000
220
0
0
US

Using CR7

Not every group on my main report has data from the sub report.

I'm passing a number from the subreport to the main report and subtracting it from the main report's group total.

On groups where there is no data from the subreport, the variable is using the number from the last group that had data and subtracting that.

Is there a way to reset the variable to zero when the subreport is empty? Or is there a way that I can get the main report to ignore the variable on groups where the subreport is empty?

thank you
VE
 
What section is the subreport in?
You can split that section into two pieces and reset the variable in the section just before the subreport is initiated:

WhilePrintingRecords;
Shared NumberVar xxx := 0 Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top