Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Constant number of bars in a bar graph Post Reply Post New Topic
Author Message
Kosmo QA
Newbie
Newbie
Avatar

Joined: 25 Mar 2008
Location: United States
Online Status: Offline
Posts: 8
Quote Kosmo QA Replybullet Topic: Constant number of bars in a bar graph
     Posted: 25 Mar 2008 at 10:40am

Hello.
I am creating a report with a bar graph on it, in Crystal XI, that will display the total dollar amount of scrapped parts within a given week.  I want the chart to be monthly, so it will either be displaying 4 or 5 weeks at a time.  I have a field established already that gives me the total cost of each scrapped part.  The user selects the date ranges that they are interested in seeing and the graph displays the total cost of the scrapped part for each particular date range, in this case the ranges are a week at a time.  Now, there are occasions when the user will not need to select a date range in each of the five week selections, for instance at the beginning of a month, or if there is missing data for a particular week or so on.  Now, for the occasions when a date range will not be selected, the default date of 2000/01/01 is to be used.  Right now, the report and the graph function like I want except for one thing.  I want the graph to be spaced out as if there were five bars displayed every time.  Right now, if only one week is selected, I get a very wide single bar.  If five weeks are selected, I get 5 bars at the correct width that I'm looking for.

 Is there a way that I can get the graph to not display a bar, as if the value is $0.00, and label that bar as "no data" if that particular week is not used in the parameter?

"Why does life go by so fast when days just creep along?"
--Fighting Gravity--
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Mar 2008 at 9:18pm
You need to insert some dummy data into the record set so that there is at lease a single zero amount for each week that could be graphed. There is no way for CR to fill 'empty bars' like this without corresponding data.
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
Kosmo QA
Newbie
Newbie
Avatar

Joined: 25 Mar 2008
Location: United States
Online Status: Offline
Posts: 8
Quote Kosmo QA Replybullet Posted: 26 Mar 2008 at 2:57am
Thanks Brian.
Not to sound ignorant, but how would that dummy data have to be entered, through a formula?
 
P.S.  I'm thinking about purchasing your encyclopedia, but, how much better would it be than the "The Complete Reference Crystal Reports XI" which I already have?
"Why does life go by so fast when days just creep along?"
--Fighting Gravity--
IP IP Logged
sunil
Newbie
Newbie


Joined: 12 Mar 2010
Location: United States
Online Status: Offline
Posts: 1
Quote sunil Replybullet Posted: 12 Mar 2010 at 3:22pm
Did you answer to the question
IP IP Logged
Dan3D
Newbie
Newbie


Joined: 25 Feb 2007
Location: United States
Online Status: Offline
Posts: 33
Quote Dan3D Replybullet Posted: 21 Mar 2010 at 7:40pm
If all else fails, what you are trying to do is a built-in part of our CRChart add-in library for Crystal Reports. Check out the @MIN_GROUPS macro.
 
-Dan
 
Disclaimer: This product costs money. I work for www.threedgraphics.com, the makers of this product.
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