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!

Shared variable running total problem.

Status
Not open for further replies.

gsmithmme

Technical User
Jun 3, 2004
51
0
0
US
I am using Crystal 8.5 with a Paradox database. I have a subreport that uses a shared currency variable (e2) that subtotals a prediscounted price field, so if 10 records are $10 each, the shared variable(e2) subtotal is $100.00. This subreport is an equipment list, of which there can be more than 1 equipment list for each job (I have that subreport in group by Job number). So, on the main report, I have running total formula that is:
Formula Name: RTD
shared currencyvar RTD;
RTD:=RTD+(shared currencyvar e2);

Then in the main report, I have a second field that just contains The formula field {RTD}

The problem I am having is that when the report extends to a second page, the running total formula is firing a second time, and so a total discount of $100.00 is now displaying $200.00 on page 2. Normally, I would create a running total reset (shared currencyvar RTD=0) and place it in the group header containing the subreport, but in this case, I want it to total up this total discounted amount for all equipment lists.

Any suggestions on how to keep that running total from "firing" again when the report goes to 2 pages?

 
Unfortunately, it's not set to repeater the header.. I wish it was that easy :)
 
You need to explain the group structure of the main report and where each formula is located in the main report. Also explain how you have linked the sub to the main report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top