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

Formula Chart Conundrum

Status
Not open for further replies.

dancar

Technical User
Mar 23, 2001
32
US
All:

I have a report grouped by a date field, grouping by date. On each section footer is a formula that calculates a value based on a running total and another formula.

The boss wants a line chart that shows the value of this formula field for each day. Now, I understand that charts can't use values from running totals, so I created a value := value + 1 formula to use instead.

Next I was getting a message that form Print-time formulas can't be used. But when I remove WhilePrintingRecords from the offending formula, the values turn to 0s. I've gone through this and eventually got the correct values to appear in each section footer, but the chart shows a flat line at zero for the who reporting period.

What do I need to do to show a chart with correct formula values?

Thanks.

 
I've been through the steps in the linked document, but all I get is a blank white space where the chart should be.

Here's what I am doing that differs from the document.
First of all, I'm using Crystal Designed 2008. Next, the main report is grouped by a date summarized by each day.

Because the source data contains datetimes, I need to strip out the times for this to work, so my OnChangeOf formula is

strOnChangeof := strOnChangeOf + ToText(Date({CreatedOn})) + "^"

Likewise in the SubReport I created a @pDate formula to parse the date:

ToText(Date({CreatedOn}))

So the Subreport selection formula is
@pDate in Split((@onChangeOf),"^")

@pDate is also used in the chart.

I have unsuppressed the band in the main report containing the @OnChangeOf and @ShowValues formulas, and the arrays appear to be built correctly, but the chart is still blank.

What should I be looking for?
 
You might want to format the dates in both main and sub:

ToText(Date({CreatedOn}),"yyyy-MM-dd")

I think in the main report you should also add a formula to the report footer like this:

whileprintingrecords;
strOnChangeof;

Both formulas should be specified as "whileprintingrecords;", by the way. If this still doesn't work for you, please show the content of your showvalue formula in the sub.

-LB

 
I took your suggestions, but no change My ShowValue (named ShowProjected in this report) is

ToNumber(Split({?Pm-@ShowProjected},"^")[RecordNumber])

 
Have you inserted a group on date in the subreport? If not, do that, and then try replacing recordnumber with groupnumber in the showvalue formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top