Print Page | Close Window

suppress chart axis if blank

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7953
Printed Date: 04 May 2024 at 5:00am


Topic: suppress chart axis if blank
Posted By: tdavenport
Subject: suppress chart axis if blank
Date 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.



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


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


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


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


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



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



Print Page | Close Window