Wednesday, May 16, 2018

Bar Chart with two values in “Change On”, skip bars with value 0

Leave a Comment

I have a Crystal Reports bar chart based on the following sql statement:

Select 'Max' as Name, '2018-05-02' as Day union all select 'Max', '2018-05-02' union all select 'Max', '2018-05-02' union all select 'Fritz', '2018-05-02' union all select 'Fritz', '2018-05-02' union all select 'Fritz', '2018-05-03' union all select 'Fritz', '2018-05-03' union all select 'Fritz', '2018-05-03' union all select 'Max', '2018-05-04' 

That is I have data for three days and on each day, some names may appear multiple times. I now want to show a chart where for each day, I see how often each name appears. I try with the following setting:

enter image description here

What I get as a result is quite close to what I want to achieve:

enter image description here

However, the problem is that the chart reserves space for all two names for each day. This becomes a problem when there are more than two names and only a few names appear each day.

Like in this example with a lot more names that each only appear on a few days:

Select 'Max' as Name, '2018-05-02' as Day union all select 'Max', '2018-05-02' union all select 'Max', '2018-05-02' union all select 'Hans', '2018-05-02' union all select 'Beate', '2018-05-02' union all select 'Luise', '2018-05-02' union all select 'Sandra', '2018-05-02' union all select 'Fritz', '2018-05-02' union all select 'Fritz', '2018-05-02' union all select 'Fritz', '2018-05-03' union all select 'Fritz', '2018-05-03' union all select 'Fritz', '2018-05-03' union all select 'Max', '2018-05-04' union all select 'Rainer', '2018-05-04' union all select 'Elvira', '2018-05-04' union all select 'Silvia', '2018-05-04' 

enter image description here

For each day, space is reserved for every name that appears on any of the days. Is it possible to make Crystal Reports skip these columns and only reserve space for columns that have a value other than 0?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment