在Crystal Report中按文档编号分组 [英] Group by DocumentNumber in Crystal Report

查看:49
本文介绍了在Crystal Report中按文档编号分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我对设计水晶报表有一个问题.在我的存储过程中,我得到了这样的数据.
Docnum日期帐户AccountName金额
1 2012-04-19 46 A 100
1 2012-04-19 47 B 140
1 2012-04-19 53 C 60
2 2012-04-20 46 A 90
2 2012-04-20 47 B 30
2 2012-04-20 53 C 90
3 2012-04-21 46 A 200
3 2012-04-21 47 B 160
3 2012-04-21 53 C 20

我想按Docnum分组,我的示例设计如下:

Docnum日期帐户AccountName金额
1 2012-04-19 46 A 100
47 B 140
53 C 60
2 2012-04-20 46 A 90
47 B 30
53 C 90
3 2012-04-21 46 A 200
47 B 160
53 C 20

有谁知道我该如何设计上述(第二个)

谢谢

TONY

Hi all,

I have one problem with design crystal report. in my Store procedure,i got data like this.
Docnum Date Account AccountName Amount
1 2012-04-19 46 A 100
1 2012-04-19 47 B 140
1 2012-04-19 53 C 60
2 2012-04-20 46 A 90
2 2012-04-20 47 B 30
2 2012-04-20 53 C 90
3 2012-04-21 46 A 200
3 2012-04-21 47 B 160
3 2012-04-21 53 C 20

I want to group by Docnum and my sample design is like this:

Docnum Date Account AccountName Amount
1 2012-04-19 46 A 100
47 B 140
53 C 60
2 2012-04-20 46 A 90
47 B 30
53 C 90
3 2012-04-21 46 A 200
47 B 160
53 C 20

Does anyone know how can i design like above(2th)

Thanks

TONY

推荐答案

请参阅本文以获取有关如何进行分组的示例:
使用其功能组,图形,交叉表和子报表逐步创建Crystal报表 [ ^ ]

您需要尝试查看适合自己的方法.
Look at this article for sample on how to do grouping:
Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report[^]

You need to try and see what works for you.


在报告中的DocNum上创建分组.在groupHeader中,从数据库中放置DocNum字段.

创建一个子报表,并将其放置在报表的详细信息"部分中.

将子报表链接到DocNum字段.

将所需的所有其他字段放在子报表中.

多数民众赞成在接近你想要的.
Create a Grouping on DocNum in the report. In the groupHeader place your DocNum field from Database.

Create a subreport and place it in the Details section of the report.

Link the subreport to the DocNum field.

Place all the other fields that you want in the subreport.

Thats close to what you want.


这篇关于在Crystal Report中按文档编号分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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