Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: suppress chart axis if blank Post Reply Post New Topic
Author Message
tdavenport
Groupie
Groupie
Avatar

Joined: 21 Oct 2008
Location: United States
Online Status: Offline
Posts: 41
Quote tdavenport Replybullet Topic: suppress chart axis if blank
    Posted: 07 Oct 2009 at 11:14am
I have a chart that show a list of categories and the count. I'm showing the top 10 categories in decending order. One of the axis is blank but it shows the count. I don't want to exclude blanks from my report but I DO want to suppress the blank axis in the chart. I've seen the chart format option to suppress ( and I've set it to say Category = ") but this doesn't suppress the blank axis.
 
Any ideas? All suggestions are welcome.
 
Thank you!
Any and all suggestions are welcome.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Oct 2009 at 7:37am
1. What kind of chart?
2. Since you are showing top 10 and if the 'blanks' ar ein the top 10 are you looking for the top 10 without the blanks or the the top 10 with a suppressed blank making it show only the top 9?
IP IP Logged
tdavenport
Groupie
Groupie
Avatar

Joined: 21 Oct 2008
Location: United States
Online Status: Offline
Posts: 41
Quote tdavenport Replybullet Posted: 08 Oct 2009 at 11:28am

It's a basic bar chart. The chart shows the count of categories. Ex.

 
Atlanta             123
Birmingham      108
Philadelphia       99
Washington       78
Chicago             47
Dallas                38
                         34
Columbus          31
Lexington          28
Baltimore           19
 
In the details of the report I want to see all records. They are grouped by category and I have a function that substitues the word "not defined" for the blank category. My chart, however, focuses on the change of category ( not the function) and so I have this entry in the chart that is blank. I'm looking to suppress the blank axis. If my chart shows 9 as a result then I think that will be OK. If it shows the 11th category in the # 10 slot then that's fine too.
Any and all suggestions are welcome.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Oct 2009 at 1:59pm
Probably the most base solution is to make a sub-report displaying the chart only and exclude the Blank values in the record selection of the sub report.
If you do not have any duplicates and are doing counts (not distinctcounts) you could create a formula field to insert 1 or 0 (1!="", 0="") and then show the value as the SUM of that in the chart.
If table.field="" then 0 else 1
This would drop the "" grouping off the chart if you have it set to top N (10) and there are at least 10 other categories with at least 1 record.
 
You could use a Running Total but not as a top N. Set it to conditionally count records where field <> "".


Edited by DBlank - 08 Oct 2009 at 2:45pm
IP IP Logged
tdavenport
Groupie
Groupie
Avatar

Joined: 21 Oct 2008
Location: United States
Online Status: Offline
Posts: 41
Quote tdavenport Replybullet Posted: 14 Oct 2009 at 3:57pm
I'm with you on the "If-then-else". That's a good idea.  I'll give it a shot.
Thank you!
Any and all suggestions are welcome.
IP IP Logged
deggdegg
Newbie
Newbie


Joined: 11 Jan 2011
Online Status: Offline
Posts: 3
Quote deggdegg Replybullet Posted: 12 Jan 2011 at 8:30am
I see that this is an old post, but I'm trying to do something similar to this:

2. Since you are showing top 10 and if the 'blanks' ar ein the top 10 are you looking for the top 10 without the blanks or the the top 10 with a suppressed blank making it show only the top 9?

Basically looking for the top 10 with a suppressed blank.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2011 at 4:22am

No this did not suppress likeyou are trying to do, it excluded based on the top 10 and the "" value not getting into the top 10.

I think in your other post you were using 2 sub reports for top N and bottom N and trying not to get show the same name in both charts. YOu were passing a param value in as the N for bothg charts.
WHy not do a distinctCOunt of names and divid by 2 and pas that as your N?


Edited by DBlank - 13 Jan 2011 at 4:23am
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.031 seconds.