Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Chart based on a formula Post Reply Post New Topic
Author Message
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Topic: Chart based on a formula
    Posted: 08 Jan 2008 at 4:42am
I am trying to add a chart to my report. All the 'help' and books I have say formulae can be used but the ones I have do not appear in the list of fields to choose from.
 
These are percentages based on running total fields, they sit in the group footer and are just numbers.  (eg, 100*(total A + total B)/total C)
 
I am using Crystal 10. Is there any way to get the chart to see these fields, or another way of creating them so it can?   (It works ok if I put 'total A' alone, but that is not what is required.)
 
Also, the only option I have for designing the chart is the Advanced button, despite the fact that I have groups and summaries in the report.  I had thought the Group option might be what I wanted, but it isn't available.  This does not match what the 'help' says, what is it that makes other options work?
 
That's two questions I suppose, but they are linked.   TIA for any advice.
 
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 08 Jan 2008 at 11:47am
Charting on formulas can be very tricky, and very frustrating.  Some formulas are simply calculated too late in the Crystal system to be used in a chart.  Yours is a good example of such.

Out of curiosity, could you try creating the formula using summary functions instead?  I.e., make your formula look like:

100 * (SUM({MyReport.A},{ MyReport.MyGroup}) + SUM({MyReport.B},{MyReport.MyGroup}) / SUM({MyReport.C},{MyReport.MyGroup})

Crystal may be better able to process this formula, rather than a running total.

Honestly, I strongly recommend that you only use the Advanced button.  The Group button is basically a simplified wizard, to create the chart based on existing groups and summary fields.


IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 09 Jan 2008 at 4:32am
Thanks for that.
You say "Some formulas are simply calculated too late in the Crystal system to be used in a chart. " I thought if you had the formulae in the group footer the result would be available in the report footer.
 
I will try the SUM route and see what happens Smile
 
As to the Advanced/Group buttons, it just worried me that the Group etc were greyed out. I was wondering what criteria Crystal used to decide that.
 
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 09 Jan 2008 at 5:07am
Mostly, it uses where you put the chart.  Putting the chart in the report footer is a non-standard location.  So, reasons Crystal, you probably want a non-standard solution.  The Group solution is extremely bog standard.  So, it doesn't even offer it up to you.

Well, ok, actually the reason has a lot more to do with the way Crystal reads in and processes information.  But, really, it still pretty much boils down to what I said.
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 10 Jan 2008 at 6:20am
I have it working now  Smile
The chart can see the sums where it couldn't see the running totals, and it now looks very pretty!
 
And the Group button has reappeared now I don't want it any more.
Thanks for all your help.
IP IP Logged
Pablo84
Newbie
Newbie
Avatar

Joined: 26 Nov 2008
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Pablo84 Replybullet Posted: 26 Nov 2008 at 4:41am
I have the same issue except for the fact that my running total is evaluated using a condition e.g. fieldValue = 1
 
I am using Crystal Reports 11.
How can I work around this?
 
Thanks in advance!


Edited by Pablo84 - 26 Nov 2008 at 4:42am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.