vb.net 报告标题部分中的 ReportViewer 分组标题?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14692030/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ReportViewer grouping header in report header section?
提问by urlreader


Hi, I'm working on a report which uses reportviewer in VS2010.
嗨,我正在处理一个在 VS2010 中使用 reportviewer 的报告。
It is an invoice report. It has some accountsin the system, for each account, it has some orders. Now, in each month, we need to send the invoice to each account.
它是发票报告。它在系统中有一些帐户,对于每个帐户,它都有一些订单。现在,每个月,我们都需要将发票发送到每个帐户。
In the report, at the top, we need to list "Bill To"(the address for each account)and "Invoice#", for each account, it is different, and it is continouous. Then, at the center, it should list the details of the orders for this account. Obviously, each account should have an invoice.
在报表的顶部,我们需要列出“Bill To”(the address for each account)和“Invoice#”,对于每个帐户,它是不同的,并且是连续的。然后,在中心,它应该列出该帐户的订单详细信息。显然,每个帐户都应该有发票。
See the attached screen shot. I used grouping and created the invoice shown in screen shot.
请参阅随附的屏幕截图。我使用了分组并创建了屏幕截图中显示的发票。
But, it has a problem. The "Account address", "Terms", and "Invoice #", I could not put them in the grouping (those are the same within the group). Thus, for different groups, they are shown as the same values, although in the rdlc file, I put their fields there.
但是,它有一个问题。在“帐户地址”,“条款”,和“发票号码”,我不能把他们分组(这些都是集团内相同)。因此,对于不同的组,它们显示为相同的值,尽管在 rdlc 文件中,我将它们的字段放在那里。
Anyone knows how to solve the problem?
有谁知道如何解决问题?
One possibility is: instead of creating the invoice for all accounts in one report (i.e. 20 pages, each page is an invoice for an account), create a report for each invoice for each account (so total 20 files), then print the invoice directly. This will work since we can manipulate all the data, and use reportviewer parameters for Account Address, Terms, ...
一种可能性是:不是在一个报告中为所有帐户创建发票(即 20 页,每页是一个帐户的发票),而是为每个帐户的每个发票创建一个报告(因此总共 20 个文件),然后打印发票直接地。这将起作用,因为我们可以操作所有数据,并使用报表查看器参数作为帐户地址、条款...
However, it means we could not browse the reports before print (withint the software). Any suggestions?
但是,这意味着我们无法在打印之前浏览报告(在软件内)。有什么建议?
thanks
谢谢
reader
读者
回答by Irf
What you can do is , since for each account there is an address, invoice# and invoice details or ordersin your case,
So what you can do is :
您可以做的是,因为对于每个帐户,您的案例中都有一个地址、发票# 和发票详细信息或订单,
所以您可以做的是:
EDIT :Let me go in some detailed fashion ! (Please zoom in to see the image details clearly)
编辑:让我以一些详细的方式去!(请放大看清楚图片细节)
1.Create a new report and add a Tablix to it
--Tablix has the property , it can iterate through your data
and create dataset which will get data for Account address, invoice, and Terms. Then :
1.创建一个新报告并向其添加一个 Tablix
--Tablix has the property , it can iterate through your data
并创建数据集,该数据集将获取帐户地址、发票和条款的数据。然后 :
if you are not able to view the image properly ..hereis the same presented for you
This is the way I did my reports with similar requirements...sub-reportswould ease the tasks to a much extent ..
p.s:
如果您无法正确查看图像..这是为您呈现的相同内容
这是我做具有类似要求的报告的方式...子报告将在很大程度上简化任务..
ps:
- Edit:No need to go for a Header.. as you say in your subject of question. jus the main report and a sub-report should do what you need !
- I jus saw yours is
crystal report.. but the concept is over all the same
- 编辑:不需要去标题..正如你在你的问题主题中所说的那样。只是主报告和子报告应该做你需要的!
- 我只是看到你的是
crystal report.. 但概念是一样的

