动态生成.rdlc报告以供导出 [英] Dynamically generating .rdlc report for export

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

问题描述

您好,


我正在使用Microsoft.Reporting.WinForms库进行导出。要将报表定义加载到LocalReport对象,我想动态创建.rdlc(流)。


我的问题是创建报告的最佳方法是什么动态定义?


 


var report = new LocalReport();


report.LoadReportDefinition(stream);


 


我看到微软有
Microsoft.ReportingServices.RdlObjectModel 库,其中包含用于创建报告定义的
报告对象。


 


我可以使用此报告对象为
生成报告定义(流) LocalReport.LoadReportDefinition(stream)调用?


如果是,可以你给我提供了一些示例代码,它将Report对象转换为LocalReport定义?


  ;


否则,是否存在为LocalReport动态创建.rdlc报告的替代方法和导出?


 


谢谢,


Anwar

解决方案

您好Anwar,


您的项目类型是什么?


我找到了一个关于如何在Winform项目中动态创建RDLC的文档,请参考如下:


为报告查看器本地报告动态生成RDLC


问候,


Frankie


Hello,

I am using Microsoft.Reporting.WinForms library for my exports. To load the report definition in to LocalReport object, i would like to create .rdlc (stream) dynamically.

My question is what is the best way to create the report definition dynamically?

 

var report = new LocalReport();

report.LoadReportDefinition(stream);

 

I see that Microsoft has the Microsoft.ReportingServices.RdlObjectModel library which contains the Report object to create report definitions.

 

Can I use this Report object to generate the report definition (stream) for the LocalReport.LoadReportDefinition(stream) call?

If so, can you provide me some sample code which converts the Report object to LocalReport definition?

 

Otherwise, is there any alternate method for dynamically creating .rdlc report for LocalReport and exporting?

 

Thanks,

Anwar

解决方案

Hi Anwar,

What the type of your project is?

I found a document about how to dynamically create RDLC in Winform project, please refer to it as below:

Generating RDLC Dynamically for the Report Viewer Local Report

Regards,

Frankie


这篇关于动态生成.rdlc报告以供导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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