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

Running Total that needs to start from something other than zero 1

Status
Not open for further replies.

jkob

Programmer
Jan 28, 2004
7
GB
HELP PLEASE !! I'm trying to do a running total on a report that I am writing using Crystal Reports version 9 but I need the total to start from a figure that is asked for by a parameter...I need it to do this because the report is run once a month and the total is accumulated each month...does anyone know how to do this please ??
 
Why not use a formula field that adds the parameter value to the running total?

Madawc Williams
East Anglia, Great Britain
 
You could create a manual running total to accomplish this.

Create these 2 formulas:
@Init
Code:
whileprintingrecords;
numberVar RT := {?prompt};
@Increment
Code:
WhilePrintingRecords;
numberVar RT := RT + 1;

@Init should go into your Report Header
@Increment should go into the section that you want the Running Total to appear and increment.
If you need to accumulate, you can change the Increment to something like this:

@Accumulate
Code:
WhilePrintingRecords;
numberVar RT := RT + {table.field}

~Brian
 
To clarify what I said earlier, let the running total start from zero and accumulate naturally. When it comes to displaying the value on the report, use a formula field which adds the parameter value to the running total value.

Madawc Williams
East Anglia, Great Britain
 
Thanks for the replies. I've incorporated BDREED35's suggestio and it's worked perfectly..thanks a lot for that Brian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top