Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Changing Cross-Tab Total Column to "% Change" Post Reply Post New Topic
Author Message
Nugby
Newbie
Newbie
Avatar

Joined: 08 Oct 2009
Location: Australia
Online Status: Offline
Posts: 5
Quote Nugby Replybullet Topic: Changing Cross-Tab Total Column to "% Change"
    Posted: 25 Oct 2009 at 11:02pm
Hi guys,
 
Have been struggling with this Cross-Tab issue. I've set up a Report so users can select the Start and End Month, and display the value of certain investments for each Month End. My boss now wants to see the Percentage Change from the first month's value to the last months value for each investment. E.g. if Investment 1 was worth $10,000 in July but worth $10,500 in October, display 1.05%.
 
I've played around with including the Total column (for Rows) and trying to get that to get the first number using the Maximum Date conditionally(Value at the final date: "sum({Value},maximum({ValueDate}))", etc)  minus the second value (using the first date) but using this, declaring the date in a formula and calling that, etc, only give me various errors.
 
Does anyone know what I'm doing wrong there or how else to do this? There'll be a variable number of dates across the page and a variable number of Investment down the page, so I need to include this within the Cross-Tab somehow but I can't see how it can be done. 
IP IP Logged
Nugby
Newbie
Newbie
Avatar

Joined: 08 Oct 2009
Location: Australia
Online Status: Offline
Posts: 5
Quote Nugby Replybullet Posted: 26 Oct 2009 at 8:55pm
Hey, I've just created a new SQL Function that returns the Percentage as a number for "the 1st of January 3000" (i.e. far right column) which I can see getting this over the line, so I probably don't need any help with this one anymore.
 
If someone thinks it IS possible in Crystal Reports, let me know though, as I feel pretty disappointed with it in this case.
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 26 Oct 2009 at 9:01pm
This is actually pretty complicated. The basic idea is that you create an array for each column you want to store the values of (start month, end month), then override the text value of the summary column with your own calculation. It's a bit of work!

If by chance you wanted to see how all this works, I documented all the steps and give you the sample code for it in my Crystal Reports XI book that you can find online at http://www.CrystalReportsOnlineTraining.com
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
Nugby
Newbie
Newbie
Avatar

Joined: 08 Oct 2009
Location: Australia
Online Status: Offline
Posts: 5
Quote Nugby Replybullet Posted: 26 Oct 2009 at 9:19pm
So it is theoretically possible,  good to know. Thanks, Brian.
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.