Print Page | Close Window

% in auto crosstab in CR11

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=10563
Printed Date: 01 May 2024 at 5:00am


Topic: % in auto crosstab in CR11
Posted By: hermiod
Subject: % in auto crosstab in CR11
Date Posted: 19 Jul 2010 at 2:47am
I have 2 fields and wish to express one as the percentage of another within an auto-crosstab.
Is this possible in 11.5 or will I have to use manual crosstab?

Grid looks like this currently:

Area       | C1 | C2
--------------------
Grouping 1 | 20 | 15
Grouping 2 | 30 | 20

I'd like to have another column on the end of this crosstab showing C2 as a percentage of C1.



Replies:
Posted By: Shures
Date Posted: 30 Jul 2010 at 6:46am

Were you ever able to figure this out?  I have the same problem with my cross tab. 

The formula I wrote works for the percent of the list as a whole but not each individual row. 
 
Name   Made  Total   Percent
Dave       66     100        66%  <----How do I get that number?
Larry       54     108        50%  


Posted By: hermiod
Date Posted: 30 Jul 2010 at 11:07am
I don't think there is a way to do it in CR11 although I think you can do it in 2008.

The only way I can think to get around this is to have the percentage as a column in the source SQL but that only works if you are getting the data out of the database as you wish to display it rather than aggregating from source data within Crystal.

You could always try it as a SQL expression I suppose, that may have the desired effect.

I ended up just building this as a manual table in the end.


Posted By: sunnyday
Date Posted: 03 Aug 2010 at 6:53am
how do you create a manual table? in a crosstab report, the values are referencing the same database field. how can you get around this manually? i'm asking because i have the same problem where i need to create a formula based on 2 values in a crosstab report, but it can't be done.
Thanks,



Print Page | Close Window