Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Showing multiple graphs Post Reply Post New Topic
Author Message
fdfjc
Newbie
Newbie


Joined: 02 Sep 2008
Location: United States
Online Status: Offline
Posts: 9
Quote fdfjc Replybullet Topic: Showing multiple graphs
    Posted: 06 Jan 2009 at 12:36pm
Hi, I have a problem I hope someone can help me with.   I have a report that displays a graph based on several parameters.  One of the parameters is time periods, 30 day, 90 day, 180 etc.  The user selects this parameter on opening the report.  I would like to be able to display all time periods on one report using a different graph for each time period, but all the other parameters would stay the same.  Is this possible?
Brenda
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jan 2009 at 7:45am
Not knowing exactly how your report and select statements are set up here is 1 possible way you might handle this. You will need to play with the idea based on your set up.
Change your "time period parameter" from selecting data to displaying data. You will still need a way to select the overall total amount of data on a total time frame that you are working with.
This way all the data for all time periods are still pulled in and can therefore have totals be displayed in graphs but you can conditionally suppress other display sections of the data based on the parameter selected.


Edited by DBlank - 07 Jan 2009 at 7:46am
IP IP Logged
fdfjc
Newbie
Newbie


Joined: 02 Sep 2008
Location: United States
Online Status: Offline
Posts: 9
Quote fdfjc Replybullet Posted: 07 Jan 2009 at 11:34am
Thanks DBlank, I have set the time parameter to pull in the maximum number of days I will need -- 730.  From there I would like to be able to set up several time ranges inside the report (30 days, 90 days, etc.) I thought that formulas would be the best way to do this so I tried these two through the formula editor. 
{Query1.Production Date} in "CurrentDate - 31" to "CurrentDate" and
also {Query1.Production Date} > "CurrentDate - 91"  Both of these return "False" instead of the Production Date in the correct range.  When I used the formulas in the Select Expert, I got no data returned at all.  Can you tell me what I'm doing wrong?  Thanks for any help you can give.
Brenda
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jan 2009 at 12:14pm
You won't be able to group on these but you can do conditional counts or running totals for your graph and suppress lines on these. I think if you grouped on it the record will only show up in one group even if it meets conditons for multiple groups.
I would try these for your formulas:
Formula as Last30days: if {Query1.Production Date} in (dateadd("d",-30,today)) to today then 1 else 0
This will return a 1 if the date is in the last 30 days and a 0 if it is not. You can then use the 1 or 0 for summing and conitional supports or you can chnage it to True /False, whaterver works for you.
Formula 2 as Last90days: if {Query1.Production Date} in (dateadd("d",-90,today)) to today then 1 else 0
 
IP IP Logged
fdfjc
Newbie
Newbie


Joined: 02 Sep 2008
Location: United States
Online Status: Offline
Posts: 9
Quote fdfjc Replybullet Posted: 08 Jan 2009 at 5:44am
Thank you so much DBlank.  I will try this today.
Brenda
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.047 seconds.