SQL Server 2008 Reporting Services是否可以将对象列表用作ASP.NET应用程序中的数据源

时间:2022-03-03 16:31:53

I am working on an ASP.NET (3/5) web application. In the application, we assemble lists of classes from a variety of data sources. I would like to create a report in SQL Server SSRS that renders a report from the contents of one of those lists, without pushing the list to the database (in fact, it would be a violation of a bunch of rules if we did that). Right now we are using SQL Server 2005 but we are considering a move to 2008. Is what I want to do possible and, if so, how do I do it?

我正在研究ASP.NET(3/5)Web应用程序。在应用程序中,我们汇集了各种数据源的类列表。我想在SQL Server SSRS中创建一个报告,该报告从其中一个列表的内容呈现报告,而不将列表推送到数据库(事实上,如果我们这样做,那将违反一堆规则) 。现在我们正在使用SQL Server 2005,但我们正在考虑迁移到2008年。我想做的是什么,如果是的话,我该怎么做?

2 个解决方案

#1


1  

Reporting services offer something called as DataSet extensions. You may use that to render the report from your custom data source. You do not need to load them back into database. However, certain editions of SQL like SQL Express reporting services does not support dataset extension.

报告服务提供称为DataSet扩展的东西。您可以使用它来从自定义数据源呈现报表。您无需将它们加载回数据库。但是,某些版本的SQL(如SQL Express报告服务)不支持数据集扩展。

#2


0  

You might want to use the ReportViewer control which ship with Visual Studio 2005 and Visual Studio 2008.

您可能希望使用Visual Studio 2005和Visual Studio 2008附带的ReportViewer控件。

It can run in a "local mode", which doesn't require a Report Server backend. You simply drop it from the VS toolbox onto an ASPX form, then wire it up in code with any IEnumerable collection as its datasource, and then provide it with a report definition file for local mode (RDLC).

它可以在“本地模式”下运行,不需要Report Server后端。您只需将其从VS工具箱中删除到ASPX表单上,然后在代码中将其与任何IEnumerable集合作为其数据源连接,然后为其提供本地模式(RDLC)的报告定义文件。

The RDLC file is basically the same as the original RDL (report definition language), but it omits a few things like the datasource, which is provided by your application. The ReportViewer control contains a smaller version of the report processing engine, so that at runtime, it "couples" the RDLC you provide with a data set or bindable collection, and it does the rest.

RDLC文件与原始RDL(报告定义语言)基本相同,但它省略了一些诸如数据源之类的内容,它由应用程序提供。 ReportViewer控件包含一个较小版本的报表处理引擎,因此在运行时,它会将您提供的RDLC与数据集或可绑定集合“耦合”,并完成剩下的工作。

For more details on this control, check out the following site: www.gotreportviewer.com

有关此控件的更多详细信息,请访问以下站点:www.gotreportviewer.com

HTH

#1


1  

Reporting services offer something called as DataSet extensions. You may use that to render the report from your custom data source. You do not need to load them back into database. However, certain editions of SQL like SQL Express reporting services does not support dataset extension.

报告服务提供称为DataSet扩展的东西。您可以使用它来从自定义数据源呈现报表。您无需将它们加载回数据库。但是,某些版本的SQL(如SQL Express报告服务)不支持数据集扩展。

#2


0  

You might want to use the ReportViewer control which ship with Visual Studio 2005 and Visual Studio 2008.

您可能希望使用Visual Studio 2005和Visual Studio 2008附带的ReportViewer控件。

It can run in a "local mode", which doesn't require a Report Server backend. You simply drop it from the VS toolbox onto an ASPX form, then wire it up in code with any IEnumerable collection as its datasource, and then provide it with a report definition file for local mode (RDLC).

它可以在“本地模式”下运行,不需要Report Server后端。您只需将其从VS工具箱中删除到ASPX表单上,然后在代码中将其与任何IEnumerable集合作为其数据源连接,然后为其提供本地模式(RDLC)的报告定义文件。

The RDLC file is basically the same as the original RDL (report definition language), but it omits a few things like the datasource, which is provided by your application. The ReportViewer control contains a smaller version of the report processing engine, so that at runtime, it "couples" the RDLC you provide with a data set or bindable collection, and it does the rest.

RDLC文件与原始RDL(报告定义语言)基本相同,但它省略了一些诸如数据源之类的内容,它由应用程序提供。 ReportViewer控件包含一个较小版本的报表处理引擎,因此在运行时,它会将您提供的RDLC与数据集或可绑定集合“耦合”,并完成剩下的工作。

For more details on this control, check out the following site: www.gotreportviewer.com

有关此控件的更多详细信息,请访问以下站点:www.gotreportviewer.com

HTH