Print Page | Close Window

Showing multiple graphs

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5151
Printed Date: 05 May 2024 at 4:19am


Topic: Showing multiple graphs
Posted By: fdfjc
Subject: Showing multiple graphs
Date 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



Replies:
Posted By: DBlank
Date 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.


Posted By: fdfjc
Date 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


Posted By: DBlank
Date 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
 


Posted By: fdfjc
Date Posted: 08 Jan 2009 at 5:44am
Thank you so much DBlank.  I will try this today.

-------------
Brenda



Print Page | Close Window