Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Graph - Formula not available Post Reply Post New Topic
Author Message
regism
Newbie
Newbie


Joined: 05 Dec 2007
Online Status: Offline
Posts: 4
Quote regism Replybullet Topic: Graph - Formula not available
     Posted: 05 Dec 2007 at 5:10am
Hi,
 
I am pretty new at Crystal and I do have a situation.
 
I have a report structured as follow:
 
Group1
 
Group2
 
          Detail (suppressed) includind several formula such as
 
DateTime
 
and
 
//GOS Call
if ({@ansdCall}+{@abndCall}) <> 0
then    Round((({@ansdCallSlv2}/({@ansdCall}+{@abndCall}))*100),2)
else    0     for now we can call this formula gos%call
 
Group Footer2
 
DateTime
 
and
 
//G2 GOS Call
if ({#ansdCall}+{#abndCall}) <> 0
then    Round((({#ansdCallSlv2}/({#ansdCall}+{#abndCall}))*100),2)
else    0  for now we can call this formula G2gos%call
 
Group Footer 1
 
 
What I would like to do is create a bar graph with : DateTime on X Axis, and G2gos%call on the Y Axis
 
 
The problem is in the Dtata tab of the Graph Expert, I cannot select G2gos%call as it is not present. However gos%call is...
 
Any idea?
 
Many thanks,
 
Regis
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 05 Dec 2007 at 7:04am
This is a basic limitation in Crystal, due to the two pass methodology.  Basically, Crystal runs through the data twice in an attempt to calculate everything.  So, in your second formula, it runs through it once to calculate the running total, and a second time to calculate the formula.  It doesn't have a third pass in which to put the formula results in the chart.

Brian's book has some really good information on this limitation, as well as some work-arounds.

The easiest solution is to find some way to consolidate a lot of this work into a single pass.  Is there any way you can incorporate all of that functionality into a single running total?  (Actually, out of curiosity, why are you using running totals to calculate call percentages anyway?)  Can you simply group by your DateTime value, say by day, and use summary values instead of running totals?
IP IP Logged
regism
Newbie
Newbie


Joined: 05 Dec 2007
Online Status: Offline
Posts: 4
Quote regism Replybullet Posted: 05 Dec 2007 at 11:43pm

Many thanks for your fast response Lugh.

 

Unfortunately I can not use plain Summary instead of the formula because of the table design.

This table is a stats table and does not contains the CallID. Also we make ifference between calls answered within 10 sec, 20 sc, 1 min...up to 1 hour. So even if can incorporate some summary, I still need to make a formula out of those. I did try that and I have the same problem: the final formula cannot be added on the graph...
 
I am kind of stuck right now, very frustrating for something with seems so basic.
 
Thanks again,
 
Regis
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 07 Dec 2007 at 6:32am
How familiar are you with SQL?  If you use the Add Command function to base the report on a SQL command instead of an existing table, you can do some of your functionality there.  That will calculate some of these values before even the first pass.  (Or, even better, you could get your DBA to create a view for you to use.)




IP IP Logged
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