如何在Crystal Reports for Visual Studio中实现数据透视报表? [英] How do I achieve a pivot report in Crystal Reports for Visual Studio?

查看:179
本文介绍了如何在Crystal Reports for Visual Studio中实现数据透视报表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是任何报告的排名,但水平线与小计。我有一个数据集,包括汽车在停车场花费的时间。我必须生成一个表格,其中显示每小时一列,每日一列,显示特定日期某一特定时间的条目数。

I am a rank noob at any reporting but horizontal lines with sub-totals. I have a dataset that comprises the times spent by cars in a carpark. I must produce a table showing a column for each hour and a row for each day, showing the number of entries at a particular time on a particular day.

我会发现这在RDLC设计器中更容易,因为它是列式分组,但是我甚至在Crystal中找不到这样的事情。

I would find this easier in the RDLC designer, with it's columnar groupings, but I can't even find such a thing in Crystal.

帮助。

推荐答案

假设以下字段: {table.car_id} {table。 census_time}


  • Crosstab ...;将交叉表添加到报表标题部分

右键单击交叉表并选择'交叉表专家':

Right click the cross-tab and chose 'cross tab expert':


  • {table.census_time] 添加到列字段列表;

  • {table.census_time} 添加到行字段列表;

  • {table.car_id} 添加到摘要字段列表中;计数

  • Add {table.census_time] to the column-field list; group by hour
  • Add {table.census_time} to the row-field list; group by day
  • Add {table.car_id} to the summary-field list; count

**编辑**

您不需要创建特殊公式以从日期/时间字段提取小时;

You don't need to create a special formula to extract the hour from the date/time field; the cross-tab will do that for you.


选择交叉表选项卡,添加 {table.census_time} 字段,然后单击组选项...

Select the 'Cross-Tab' tab, add the {table.census_time} field, then click the 'Group Options...' button.

从选项列表中选择每小时。

Choose 'for each hour.' from the picklist.

这篇关于如何在Crystal Reports for Visual Studio中实现数据透视报表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆