Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: add Vareince column in cross tab report Post Reply Post New Topic
Author Message
rajeshdsadalkar
Newbie
Newbie


Joined: 14 Jan 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote rajeshdsadalkar Replybullet Topic: add Vareince column in cross tab report
    Posted: 14 Jan 2009 at 9:28am
Hi,
I have Cross Tab report, with Category and Month Data in Tabular format.

I would like to add column before Total Column as Variance which should show difference between Last two months in this case June and July.

 

Note : Month / Category data are dynamic depends upon user selection.
 
For Example

 

Catergory    April    May    june    July              Variance                 Total

------------------------------------------------------------------- --------------------

X                  10      20      30      40                10                         100

Y                  5        10      12      18                06                            45

Z                   1        2        2        4                 02                            09

 

 

 rgds,

Rajesh


IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 14 Jan 2009 at 4:45pm
You can do this, but it's pretty advanced. The basic idea is to copy the values into an array as the crosstab is being generated. Then you can subtract one column from the other column by using the array index to identify which items to substract. To print the difference in another column, you can use a formula in the Text property of the cross-tab cell. This overrides the current value with your calculation.
 
I wrote about this in my Encyclopedia book and give a full working example of how to do it (takes quite a few pages as you can imagine). If you think you want to do this, I suggest checking out my book for the full tutorial and instructions. It's in the last part of Chapter 13. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.016 seconds.