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!

Displaying Totals 1

Status
Not open for further replies.

Lancedac

MIS
Apr 6, 2003
14
US
Hi all,

I am using Crystal 11. This report uses an ODBC connection to Pervasive sql tables.

In detail section A: I have running totals summing invoices for each month that meet a certain condition.

In detail section B: I have running totals summing credit notes for each month that meet a certain condition.

the report records is grouped and selected by customer ID.

In group footer I have twelve formulas @rprint1 to @rprint12. They contain:

if isnull ({#RTotal1}) then 0 + {#RTC1} else
if isnull ({#RTC1}) then 0 + {#RTotal1} else
{#RTotal1} + {#RTC1}

All this works fine. The problem is I naturally want a grand total for each month in the report footer.

So, I initialised a variable in report header:

numbervar t1;

Then in Group Footer I have the formula @GTOT1:

numbervar t1
t1 := t1 + @rprint1

This works fine . Now I am trying to use another formula @printGTOT1 to transfer the t1 variable above to the report footer for a grand total. So I do this:

numbervar t1;
t1;

But I am getting a zero. If I simply copy the @GTOT1 formula to the Report Footer I get the total overstated by the last customer's total. What am I missing? If it is correct in the group footer why can't it print in the report footer?
 
Why are you using running totals? What you are describing should require neither running totals nor variables.

Just right click the field in the detail section you want to summarize, select insert, summary, grand total (or insert group).



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Add "whileprintingrecords;" at the beginning of your formulas.

-LB
 
Thanks lbass. That works.

dgillz, the report was more complex than that. But thanks for the input.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top