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

Possible to use WhilePrintingRecords in first GH? 1

Status
Not open for further replies.
Apr 2, 2007
27
CA
So I'm setting up a report that has a GH1 and GH2.

GH2 hosts the actual WhilePrintingRecords counter and GH1 has the WhilePrintingRecords display. As you are probably guessing, this results in my first WhilePrintingRecords display to be a "0".

While the counting is correct. It is starting in the wrong row and the first row happens to be the "0".

Is there an easy fix for this or do I have to restructure my report?

Thanks in advance,
~Steve
 
Only in rare circumstances can you reference the result of a variable in a section earlier than the one in which it is set up. I think you should instead explain what and why you are counting--perhaps there is a different approach.

-LB
 
Thanks LB,

Basically in GH2 I have 2 numbers listed as the sales target for the end of the year. Which are in regions. Example, region1 target is $300,000 and region2 target is $400,000.

In GH1 I want the sum of both regions so it kinda looks like:

$700,000
-$400,000
-$300,000

What I'm currently getting is:

$0
-$400,000
-$300,000

-$700,000
etc.
 
I'm guessing the target amounts would be repeated in the detail section within each region.

Your best bet in this scenario is to save the report and insert it again as a subreport in the GH1 section. Link by the group #1 field, and then use a variable to accumulate the maximum value of the target at the region level. Suppress all sections except the subreport footer, where you display the result.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top