【发布时间】:2018-10-12 22:33:55
【问题描述】:
我有一个基于以下 sql 语句的 Crystal Reports 条形图:
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'
也就是说,我有三天的数据,每天,一些名字可能会出现多次。我现在想显示一个图表,在该图表中,我可以查看每个名称出现的频率。我尝试使用以下设置:
我得到的结果与我想要达到的结果非常接近:
但是,问题是图表每天为所有两个名字保留空间。当有两个以上的名字并且每天只出现几个名字时,这就会成为一个问题。
就像这个例子一样,有更多的名字,每个名字只在几天内出现:
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'
对于每一天,都会为在任何一天出现的每个名称保留空间。是否可以让 Crystal Reports 跳过这些列,只为值不是 0 的列保留空间?
【问题讨论】:
标签: crystal-reports