什么是动态生成RDLC报表定义在运行时的最佳方式是什么? [英] What is the best way to dynamically generate RDLC report definitions at runtime?

查看:353
本文介绍了什么是动态生成RDLC报表定义在运行时的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由用户通过执行查询生成在运行时的数据。数据的形状是未知的,因为用户可以选择哪些字段带回

该应用程序是一个ASP.NET MVC Web应用程序。该数据将.NET波苏斯。但是,每个对象可以有一个是其他对象的集合的属性

我想使用RDLC格式的报告,这样我可以利用PDF,Excel和Word中,等输出功能。

我设想被显示在网格中的数据,用嵌套网格的集合属性。

  1. 什么是我的选择产生RDLC数据?
  2. 可以RDLC处理嵌套表/网格为我收集性能要求?
解决方案

我在一年前研究这一主题,寻找一个对象模型来生成内存RDLs。有没有一个,但也有谣言。快速调查时下:所谓RDLOM一个对象模型存在,但<一个href="http://connect.microsoft.com/SQLServer/feedback/details/540183/supported-rdl-object-model-rdlom"相对=nofollow>是不是真的由微软支持。

我的实际方法使用自我生成的对象模型的构建在RDLs方案

这是一个低于理想的解决方案,因为你需要详细了解所生成的对象,因为对象的创建code是十分可怕的。但是其他的解决方法,我发现在我的调查,使用XML或XSLT直接产生RDL和他们是穷人以自己的方式。

I have data that will be generated by users at runtime by performing queries. The shape of the data is unknown because users can choose which fields to bring back.

The application is an ASP.NET MVC web app. The data will be .NET POCOs. However, each object could have properties that are collections of other objects.

I want to use the RDLC format for the reports so that I can leverage the PDF, Excel, Word, etc export functionality.

I envisage the data being displayed in a grid, with nested grids for the collection properties.

  1. What are my options for generating the RDLC data?
  2. Can RDLC handle nested tables/grids for my collection properties requirement?

解决方案

I investigated this theme a year ago, searching for an object model to generate RDLs in memory. There wasn’t one, but there are rumors about. A quick investigation nowadays: An object model called RDLOM exists, but isn’t really supported by Microsoft.

My actual approach uses a self generated object model build upon RDLs scheme.

This is a less-than-ideal solution, because you need to know the generated object in detail and because the object creation code is really ugly. But the other workarounds I found in my investigation use XML or XSLT directly to generate the RDL and they are poor in their own way.

这篇关于什么是动态生成RDLC报表定义在运行时的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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