一个报表查看器控件中的多个 rdlc 文件——可以通过子报表来完成吗?
我有多个采用相同参数的报告。
需要创建一个将所有报告合并在一起的主报告。我不想将 rdlc 文件复制粘贴到一个大文件中。
Telerik 发现了一个名为 ReportBook 的控件,但它要花钱! http://www.telerik.com/help/reporting/ designs-reports-general-explanation.html
有人知道类似的东西吗?或者我错过了一些非常明显的东西?
使用 Visual Studio 2005...
干杯
编辑:- 我尝试即时生成 rdlc 文件。不能很好地处理多个数据源。重新将我的所有报告复制粘贴到一个大的 rdlc 文件中。
子报表能解决我的问题吗?不知道这些是如何工作的。我已经看到深入报告的工作原理。事实上,我有一个两阶段的深入报告,需要在一页上显示为扁平的。
假设我有一份列出雇主的报告,并且我创建了一个列出特定雇主的所有雇员的子报告。那么是否可以在一个 rdlc 上拥有雇主列表以及每个雇主的雇员的一堆子报告?
I have multiple reports that take the same parameters.
Need to create a master report with all the reports merged together. I dont want to copy paste the rdlc files into one large file.
found a control by Telerik called ReportBook but it costs money!!
http://www.telerik.com/help/reporting/designing-reports-general-explanation.html
anyone knows something similar? or am i missing something very obvious?
using visual studio 2005...
Cheers
EDIT:-
i have tried to generate the rdlc file on the fly. doesnt work very well with multiple datasources. falling back on copy pasting all my reports into one big rdlc file.
will subreports solve my problem? not sure how these work. i have seen drill down reports work. as a matter of fact i have a two stage drill down report that needs to appear flattened on one page.
so say i have a report that lists employers and i create a subreport that lists all employees for a particular empoyer. is it then possible on one rdlc to have the list of employers and a bunch of subreports for each employer's employees?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我们正在使用reportviewer控件来显示100多个不同的报告。它工作得非常完美,你只需要投入其中即可。
是的,您可以使用尽可能多的子报告。目前我们已经使用了 4 级子报表。
使用 subreprot 您将能够非常轻松地实现您的要求。是的,您可以
对每个子报告进行分组/排序等,您必须在后端代码中捕获调用。然后您可以使用子报表名称来区分报表调用。
如果您用谷歌搜索,您将能够找到如何做到这一点!
希望这有帮助。
欢呼
阿里·法拉兹
we are using reportviewer control to display more than 100 different reports. It works perfect you just need to get into it.
Yes you can use as many subreprots as you can. at the moment we have used 4 level subreports.
you would be able to achieve your requirement using subreprot very easily. and yes you can make grouping/sorting etc.
for each subreport you will have to catch the call in the backend code. and then you can use subreport name to differenciate report call.
If you will google you would be able to find How to do it!
Hope this helps.
cheers
Ali Faraz
基本 Microsoft Report Viewer 控件中不存在该功能。正如您所建议的,您可以从 Telerik 或其他公司购买该模块 - 或者 - 您可以编写一些可以为您处理此问题的内容。
做起来有点复杂,但是可以动态生成RDLC文件。 GotReportViewer.com 上有一些代码,可以让您很好地了解其工作原理。示例的链接位于页面的右下角。基本上,其想法是生成一个 XML 文件(RDLC 文件)供报表使用,以便 ReportViewer 控件知道如何在屏幕上显示数据。
因此,我们的想法是,一旦获得了报表参数,就可以将其输入到您编写的代码中以动态创建报表定义文件,然后将报表定义文件传递给 reportViewer 控件。
我猜想这正是 Telerik 模块正在做的事情。
The functionality doesn't exist in the base Microsoft Report Viewer control. Like you suggested, you can purchase the module from Telerik, or another company - or - you could write something that will handle this for you.
It is a little complicated to do, but you can dynamically generate RDLC files. There is some code on GotReportViewer.com that will give you a good idea of how this works. The links to the examples are at the very bottom right of the page. Basically, the idea is that you generate an XML file (the RDLC file) for your reports to use so the ReportViewer control knows how to to display the data on screen.
So the idea would be that once you have your report parameters, you could feed it into the code you wrote to dynamically create the report definition file, then pass the report definition file to the reportViewer control.
I would guess that this is exactly what the Telerik module is doing.
感谢您的帮助乔恩。
我尝试动态生成 rdlc 文件,但对于从存储过程读取的多个数据集来说,它似乎不太有效。
然后查看了 telerik reporting,这是一个令人惊叹的报告工具。但使用它意味着我必须从头开始设计我的报告。
经过大量谷歌搜索后,我意识到我想要实现的目标很可能通过简单的 rdlc 报告来实现。我不知道您可以对某些字段的数据进行分组。例如,可以获得一份将所有雇员分为雇主组的报告。
至于不必复制粘贴报告.. 考虑到我工作的时间很紧,我认为在花了几个小时试图寻找解决方案后,做一点手工工作不会有什么坏处。
Thanks for your help Jon.
i tried generating the rdlc file dynamically but it did not seem to work very well for multiple datasets reading from stored procedures..
then looked at telerik reporting which is an amazing reporting tool. but using it meant i had to start designing my reports from scratch.
after a lot of googling i realised that what i wanted to achieve was very much possible with simple vs rdlc reports. dint know that you can group data on certain fields. for example could get a report of all employees divided into groups of employers.
and as far as not having to copy paste the reports.. looking at the tight schedule i was working in, i thought a little manual work would not harm after spending hours trying to look for a solution.