Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Hide null y-axis value from chart Post Reply Post New Topic
Author Message
deggdegg
Newbie
Newbie


Joined: 11 Jan 2011
Online Status: Offline
Posts: 3
Quote deggdegg Replybullet Topic: Hide null y-axis value from chart
     Posted: 11 Jan 2011 at 9:20am
Short version: I have a bar chart.  Is there a way I can hide a bar with a null y-axis label from the chart altogether?

Longer version: I have a subreport that is intended to show both the top and bottom 10 users based on some calculated average.  However, if there are less than 20 users total, I want to split the users evenly between the two charts, to prevent the same user from showing up on both charts.  I have been able to successfully do both of the following (assume 10 users total, so there should be 5 in each chart):

1) Get the "bottom N" chart to show the bottom 5 users, along with grouping all the rest of the users into a bar with a label of "" (if I could just hide this, I would be done).
2) Get the "bottom N" chart to show the bottom 5 users, and error out the summary for the rest of the users (using a null parameter), but this ends up showing a completely blank space where the bar would otherwise be.  Which is odd, because I thought that erroring out a summary would cause it to be missing altogether.

I'm strapped for ideas, it seems quite frustrating considering how simple of a thing I want to do.
IP IP Logged
deggdegg
Newbie
Newbie


Joined: 11 Jan 2011
Online Status: Offline
Posts: 3
Quote deggdegg Replybullet Posted: 12 Jan 2011 at 8:39am
Alternatively, is there a way to force top/bottom N to refresh for a chart when the report is refreshed? Another alternative I have is calculating what the top/bottom N should be on the main report, passing these as parameters to the subreport with the charts, and using a formula top/bottom N. Here's what I'm noticing with that however:

1) Run the report with parameters that return 10 users total.
2) Top N chart shows 5 users, bottom N chart shows 5 users (correct)
3) Refresh the report, selecting different parameters that return 5 users total.
4) Top N chart shows 5 users, bottom N chart shows the same 5 users (incorrect)

The subreport parameters are correct - bottom N is 2, and top N is 3, but the chart doesn't seem to realize this on the refresh. Can I force it to reconsider what the top and bottom N are?
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