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!

Formula Field and Chart Help

Status
Not open for further replies.

slellerman

Programmer
Nov 18, 2003
1
US
I am using Crystal Reports 9. I created the following formula (named Cumm$/Mhr):

If {#CummCost} > 0 Then
{#CummCost}/{#CummEhrs}
else
0

I would like to use this formula field in a chart with other fields from the database. However, when creating a chart, this formula field is not available in the "Available Fields" list for the chart. Any suggestions? Thanks in advance!
 
Please provide more information as to what kind of chart are you trying to add, the layout of the chart and possibly all the information you can provide.

Kchaudhry
 
It is because you are trying to use a running total field in the formula. You would need to create a manual running total.

formula one initializes the RT - this formula would go in the band where you were resetting your Running total - it is then suppress:
WhilePrintingRecords;
numbervar CummCost:= 0

formula two adds the fields - this one goes in the band where your costs are displayed - suppress this one too if you don't need to see it.

WhilePrintingRecords;
numbervar CummCost;
CummCost:=CummCost + {cost.field}

Use the second formula in the one from your post, replace the {#CummCost} with the second formula.



Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top