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

Using Running Totals in Charts?

Status
Not open for further replies.

DallasAggie

Programmer
Oct 24, 2002
98
US
Hi all.

Using: Crystal Reports 10 Developer

Problem:
-- Report with no groups.
-- Have two fields: (1) Planned (2) Completed
-- Have two RT's: (1) RT_planned (2) RT_completed
-- Have a formula to get percentage of RT's:
RT_Percentages (RT_completed / RT_planned) * 100

The problem is that I want to chart RT_Percentages, but the formula RT_Percentages doesn't even show up....but my RT's do.

I tried doing the Running Totals Manually using formulas, but I then got an error adding the percentages into a chart: "A print time formula modifies variables in a chart or map Detals: @RT_completed" :(

Can any one give some advice?

Thanks,
DallasAggie
 
never mind all. I finally got it to work. I still couldn't use a formula based on Running Totals, so in the manaul Running Totals that I created...I replaced WhilePrintingRecords; with WhileReadingRecords; --- this solved the problem :)

Code:
Formula Calculate Planned:
WhileReadingRecords; 
NumberVar planned := planned + {@audits_Planned};

Formula Calculate Completed:
WhileReadingRecords; 
NumberVar completed := completed + {@audits_completed};

Formula percentages:
If 
    {@Calculate Planned} <= 0 
Then 
    0 
Else
    {@Calculate Completed}/{@Calculate Planned}

Thanks,
DallasAggie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top