Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: New columns and custom page header from range Post Reply Post New Topic
Author Message
bartucha82
Newbie
Newbie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 2
Quote bartucha82 Replybullet Topic: New columns and custom page header from range
     Posted: 16 Feb 2011 at 10:18pm
Hi,
I have created a report that allows user to select data between two dates which act as parameters. What I need to do is to create n amount of columns in the report for n amount of days which exists between the dates that the user has given at prompt and to create custom label on each column, based on the date. Can this be achieved in CR XIR2?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Feb 2011 at 9:10am
You'll probably have to look at using a cross-tab for this.  This will automatically expand as the date range expands.
 
Do you limit the number of days between the two dates?  If so, you could also create a command that will pivot your data so that you have it in columns by date.  You would then set the suppress formula for each column up to the max number of columns based on whether or not there is data for that date.
 
-Dell
IP IP Logged
bartucha82
Newbie
Newbie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 2
Quote bartucha82 Replybullet Posted: 17 Feb 2011 at 8:15pm
Originally posted by hilfy

 
Do you limit the number of days between the two dates?  If so, you could also create a command that will pivot your data so that you have it in columns by date.  You would then set the suppress formula for each column up to the max number of columns based on whether or not there is data for that date.
 
-Dell

Hi,
The number of days is limited by two dates which are passed by user as parameters. Can you please elaborate a little more on the 'pivot the data' part? Because as far as I know, I'd have to create column for each day (reports needs to be for 252 working days) and then use conditions to hide the unneeded columns. But that will impact the performance severely.
Regards
Bartek

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Feb 2011 at 4:33am
That's too many days to work with - if you were limiting it to 30 days or so you could probably do this in the SQL, but not for 252 day.  So, you're going to have to use a cross-tab to get the functionality that you're looking for.
-Dell
IP IP Logged
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