Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: RunningTotal, Percent, Chart Post Reply Post New Topic
Page  of 3 Next >>
Author Message
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Topic: RunningTotal, Percent, Chart
    Posted: 13 May 2009 at 9:57am
Hello, AGAIN :)
 
working with CRXI, like always,
I'm working on an addition chart on one of my reports...
Basically a chart graphing Failure to meet compliance...
 
There are 4ways to fail... And I'm using  Running Totals to count them all out with a situational criteria they must meet to add to the count. (All simple enough so far....)
 
But I don't care about the actual # of failures .... I care about the %.... that's what i actually want to show on the graph....
 
So, I created a Formula Field for each way you can fail at meeting compliances....
----------------------------------------------------------------------------------------
({#Fail1}/ {#TotalCount_Non-Compliant}) *100
 
----------------------------------------------------------------------------------------
 
And so on for each running total....
Problem is.  For whatever reason, The {@Percent_Fail1} (And so on)
are not cabable of being used in the Chart....
 
So, since i had established that doesn't work.
I created Formula Fields to pass the running totals to Variable.
and get the percent through the variables. I am able to actually select and move these new fields into the chart. BUT They will not allow the report to run. It comes up with an error telling me the run time formula's cannot be used for the chart.....
 
 
I have also tried it creating my own Counts using the formula fields...
That also did no work....
 
Any Ideas would be very helpful...
Thanks!
-Takesen
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 May 2009 at 12:06pm
Usually in this case I end up having to create a formula field that will group the data in such a manner that would elminate the need to use running totals that conditionally count. From there you can do counts or distinct counts within those groups and use the formula field as a primary group in the chart.
What kind of chart are you looking to end up with?


Edited by DBlank - 13 May 2009 at 12:08pm
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 13 May 2009 at 1:24pm
Basically the chart is a bar graph, that has Y axis of 1-100%
 
x-axis is the {failpercent(1-4)}
 
so, it's gonna be comparing the percent of in which way they have failed to meet compliance.
 
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 May 2009 at 1:44pm
If I understand what you want correctly I think this will work...
Create a formual that will put all of your data into 1 of your 4 groupings (e.g. if condition1 then "Fail Group 1" else if condition 2 then "Fail GRoup 2" else if ...)
Create a chart:
Type: Side by Side Bar chart
data: On Change of is Above formula (fail group if then)
          Show value a distinct count of a unique record field (primary key incremental field) summarized as a percentage.
Axes: Uncheck auto-range na make min=0 and max=100
 
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 13 May 2009 at 4:55pm
I tried something like that, but then again, i could have just slipped in my thought process while doing it originally and screwed it up. I'll look at it again friday. I got a lot of stuff thrown on my lap today... I'll letcha know how it works out when i get to it...
 
Thanks DBlank,
As always. I truly Appreciate all the help you've given me!
 
-Takesen
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 15 May 2009 at 8:53am

Alright, now that i've already gotten the chance to sit down and look at this... I'm afraid this wont work :( since i'm doing compliance by Employee. so it's changing upon the User. Although this will probably work for a nice graph for the report footer to compare everyone....

I think i might be able to break this formula up into 4, and do a sum of each of them i guess...
 
if i do a percentage sum tho... is it going to take the percentage between all of them? it should right? since their evaluating the same fields...?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 May 2009 at 9:08am

You want this to start off your report as an overall summary but your design of grouping in the presentation of the data at group levels includes an employee level, correct?

This should not impact being able to do this at a report header as long as you are not trying to use the chart as a drill down function.
You can choose any number of ways you want the data grouped in the RH chart that is not contingent upon how you group it to display the actual data in groupings and details. Use the advanced function in DATA tab and you should be fine (unless I am misunderstanding something here).
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 15 May 2009 at 9:18am

Alright so..... it would look something like this...?

//decare variables

global numbervar FailGrp1;
global numbervar FailGrp2;
global numbervar FailGrp3;
Global numbervar FailGrp4;
 
If {condition1} > 140 and {condition2} <= 90 then
FailGrp1
Else if {condition1} > 140 and {condition2} > 90 then
FailGrp2
Else if {condition1} <= 140 and {condition2} > 90 then
FailGrp3
ect....
 
And this will go in the change on portion... under the user.... correct?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 May 2009 at 9:42am

Nope, Just make one formula field that has all 4 options in it. You want to keep this a single grouping point and a single data item.

Formula "FailGrouping" (or whatver you want to name it).
If {condition1} > 140 and {condition2} <= 90 then "Fail Group 1"
Else
if {condition1} > 140 and {condition2} > 90 then "Fail Group 2"
Else
if {condition1} <= 140 and {condition2} > 90 then ""Fail Group 3"
ect....
 
You may want a last ELSE then "Missed Item" to validate your formula and to make sure there were no outliers from the other 4 groups that could mess up your numbers (assuming every record must be in one of these 4 groups).
In your chart use this as the On CHange of Group field.
From there use distinct count of a unique field set as a summary percentage of that field.
Set the y scale to 0-100 to make sure it gives a full 100 percent viewing.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 May 2009 at 9:43am
Note you do not actual have to use that formula to group on in the report if you do not want to. Just use it to group in the chart.
IP IP Logged
Page  of 3 Next >>
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.