Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to show Zero Values in Charts

Status
Not open for further replies.

jpo7474

MIS
Sep 1, 2000
3
US
I have created a report that lists data for number of calls per hour. If no calls were recorded for let's say 2pm, then the data will not show any data for 2pm, example: the chart will show only the 'hours' that calls were made, but I want the chart to show all the hours of the day, for example if there are no calls for a specific hour then I still want a bar on the chart to show "0." Please help! I've tried many things thus far.
 
How can I get a graph to show zero values? [sig][/sig]
 
I also have fields in my report that contain zeros, "01" "02" etc. I need to show the zero. How do I stop Crystal from suppressing the zero? [sig][/sig]
 
Just a wild guess, but does adding .0001 to the number of calls solve the problem? The trick would be then to display the value either rounded or truncated to an integer value, but have the graph based on the real number value. [sig][/sig]
 
If you right click on the field that is supposed to display the zero and select 'Format Field'. Then select 'Customize' in the 'Number' tab. If you want zero to show up then uncheck the 'Suppress if Zero' box.
 
Yes, that would work fine if the entire field were a zero, but the fields I am working with have a zero in the begining: 01, 02, 03 etc. Crystal is automatically taking that zero off. [sig][/sig]
 
In the same area you can select 'Use leading Zero', enter a formula in there. That is the only other thing that I can think of. Give that a try. Sorry about the previous post. Guess I jumped the gun. [sig]<p>Randy McCullough<br><a href=mailto:randy.mccullough@relevant-tech.com>randy.mccullough@relevant-tech.com</a><br>There can only be one![/sig]
 
What type of platform are you getting the call data from. Lucent? I was working on a problem like this and could only resolve it using another application.I.E. Excel (and the wonderful world of lookup tables) Please Email me maybe we can come up with a solution. [sig][/sig]
 
jpo,

Crystal can only create a group graph of values that have a record in the group. Otherwise it doesn't know what the groups are.

If you can ensure that there is one record for each hour, then you are all set. In some environments this involves starting with a table of hours and doing an outer join to the details. If no details exist for an hour, then at least the controlling record holds the place. This probably won't work in your environment.

One other option that might work is to create formula columns for each hour, which would give you 24 Grand Totals in your report. You can then do a detail or advanced chart based not on groups, but on multiple totals. This is more work, but might solve the problem.

What version of CR are you using.
Ken [sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Taining by Ken Hamady</a><br>[/sig]
 
Daniel,

Your problem is different. You say that Crystal is dropping the zero. What data type is this field? Crystal can't keep leading zero's on numerics, and it can't drop them from character fields. If you have a numeric value in a format that somehow has leading zeros (ODBC from a flat text file?) then your only option is to use a formula and convert the number back to text. The ToText() function has formatting strings that you can add to ensure that the resulting string will be zero padded. Keep in mind that the result of this formula is now a string, not a number. Use the number version for math, but use the string version to display.

Let me know if this doesn't make sense.
Ken [sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Taining by Ken Hamady</a><br>[/sig]
 
What was the resolution to this problem?? I have a similar circumstance regarding days in a date range. Any help would be appreciated...thanks.
 
There were 2 different questions in this thread. The first one, how to graph values for groups that don't exist in the data never was answered. Crystal can't create groups that don't exist in the data. You would have to start with a table listing all of the groups (in this case 24 records, one for each hour) and link to the other records with an outer join and make sure your criteria didn't eliminate the empty groups.

The second question had to do with Crystal dropping a leading zero from a numeric integer. This wasn't resolved because we never confirmed the data type of the field. Numeric values don't start with a zero. I couldn't give him a formula to keep the zero without knowing for sure the data type that Crystal has used to identify this column.

If you have read the thread and don't see your answer I would start a different thread, this one is a bit muddled. Ken Hamady
 
Ken,

I did start a new thread about this issue (without any responses yet)...please check under my username.

Thanks
 
DukeStKing,

Can't find it under your name.
What was the title.
Are you sure it is there?

Ken Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
It should be under &quot;Showing Zero Results for one Date in a Range&quot; on 11/6
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top