以编程方式生成RDLC报告 [英] Programatically Generate RDLC Report

查看:84
本文介绍了以编程方式生成RDLC报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个RDLC报告并将其映射到网页上的ReportViewer控件。在这里,我的报告没有静态列,总是将它作为一个类库中的数据表进行动态填充。

能否指导我从头开始编程创建RDLC文件。

谢谢,
-nm reddy


谢谢
-nm reddy

Hi,
I would like to create one RDLC report and map it to ReportViewer control on a web page. Here my report does not have static columns, always it populates dynalically as a DataTable from a class library.

Can you please guide me to create RDLC files programatically from scratch.

thank you,
-nm reddy


thank you -nm reddy

推荐答案

如果布局报表中的元素不是动态的,您不必以编程方式生成RDL;但是,如果您正在使用表格,并且列集(或其他一些布局元素)是不同的,并且您无法通过表达式实现所需的内容而不是您可能需要的内容。如果需要以编程方式生成RDL,则需要使用Framework提供的各种XML类来生成报告,您可以参考RDL规范以更好地理解RDL元素:

http://msdn.microsoft.com/en-us/library/dd297486.aspx

对于本地模式报告,您需要参考RDL 2005规范,RDL 2008将在下一版本的控件中得到支持。可以使RDL更容易操作的一个建议是首先在设计器中创建报表,保存RDL然后只需操作需要更改的元素,而不是动态生成整个报表。希望这有助于

If the layout elements of your report are not dynamic than you don't necessarily have to generate the RDL programmatically; however if you are using tables and the columns sets (or some other layout element) are differant  and you can't achieve what you need through expressions than you may need to. If you need to generate the RDL programmatically then you need to use the various XML classes provided by the Framework to generate the report, you can refer to the RDL specification to get a better understanding of the RDL elements:

http://msdn.microsoft.com/en-us/library/dd297486.aspx

For local mode reports you need to refer the RDL 2005 specification, RDL 2008 will be supported in the next release of the control. One suggestion that could make manipulating RDL easier is to create the report in the designer first, save the RDL and then just manipulate the elements that you need to change instead of generating the whole report dynamically. Hope this helps


这篇关于以编程方式生成RDLC报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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