on 11-20-2013 10:11 AM
Hi,
I have a cross tab report, which has a grand total column. In the columns before that, I use a formula for the summarized fields for each selected record. But I want to show the sum of each column in the Grand Total column, but because I'm using a formula in the columns, it doesn't appear to be showing the sum of all the columns in the Grand Total column. Instead, it shows the same formula, which isn't correct.
Any help appreciated.
Many thanks,
Cal
Hi Callum,
Do you have a screenshot of the crosstab?
Also paste the formula you're using.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Here is the formula I'm using in the columns -
if {Tags.INT_MODE} <> 0 then
cstr (Round ({Tags.INT_AVG},1),1) & "*"
else
cstr (Round ({Tags.INT_AVG},1),1)
The field in the column is set to the summary 'MODE'.
Basically, I had wondered if there was a formula I could put in place in the Grand Total column under the 'Display String'?
Thanks,
Callum
The Grand Total column also does the same calculation.
I'm guessing you want the Grand Total column to show 'Sum' of all the Modes instead?
What version of Crystal Reports are you using? The Solution involves inserting a Blank Column (with calculation) and suppressing the Grand Total. The solution works only if you're using CR 2008 or higher.
-Abhilash
Yes there is.
Here's a sample report:
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/10c4c9c3-a275-2b10-bfa6-87b265d5a0d9
-Abhilash
Sure! Assuming the Grand Total Column is displayed to the right (towards the end of all columns), here's what you would do:
1) Right-click the last column (the column before the Grand Total Column) and select Calculated Member > Insert Column.
A blank column with zero values is inserted.
2) Right-click one of the zero values in the new column and select Calculated Member > Edit Calculation Formula and use this code:
Local Numbervar i;
Local Numbervar summ;
For i := 0 to currentcolumnindex-1 do
(
summ := summ + GridValueAt(currentrowindex, i, currentsummaryindex);
);
summ;
3) Next, right-click the blank header of this column and select Calculated Member > Edit header formula and type in:
"Summary" //You may use a name of your choice for the column
4) Right-click the Grand Total column Header > Select Column Grand Totals > Suppress Grand Totals.
Good Luck!
-Abhilash
You can also access/create a Calculated Member by:
1) Right-clicking the blank white space at the top left corner of the Crosstab > Advanced Calculations > Calculated Member
The only difference, you would need to specify exactly where you would like to place the column (done by the GridValue functions) and much more.
-Abhilash
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.