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

Sub Report total problem

Status
Not open for further replies.

smmt2207

MIS
Feb 27, 2007
36
US
I have a sub report that pulls revenue by event id, works fine.

I bring the sub report into the main report link it by event id and all works fine.

I share the numbervar so I can use this total in another calculation and here is where my problem occurs. if the total on the subreport is 0.00 then on the main report it picks up the total from the event above the 0.00 event.

For example:

event 1 = 200.00 - Correct
event 2 = 100.00 - Correct
event 3 should be 0.00 but is pulling in the 100.00 - Incorrect
event 4 = 300.00 - correct

Any thoughts would be greatly appreciated.
 
You need a reset formula for the shared variable. If you have a group on event, add a formula like this in the group footer (or a group_b section if your shared variable is referenced in group_a):

whileprintingrecords;
shared numbervar x := 0;

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top