简体   繁体   English

如何在不使用控件的情况下仅从报表服务获取数据?

[英]How can I get only data from reporting services without using their controls?

The architecture of my project is 3 tiers, basically : 我的项目的架构是3层,基本上:

(1)ASP.NET MVC --> (2) Reporting Service --> (3) Database using store procedures (1)ASP.NET MVC - >(2)报告服务 - >(3)使用存储过程的数据库

In layer (2), I used Report Viewer control in order to support layer (1) displaying the data tables to the end-users. 在第(2)层中,我使用了Report Viewer控件,以支持向最终用户显示数据表的第(1)层。 All of materials in this layer are under *.rdl files. 此层中的所有材料都在* .rdl文件下。 So, The reporting service helps layer (1) with its own controls. 因此,报告服务帮助图层(1)具有自己的控件。 In layer(1), just use: 在图层(1)中,只需使用:

 Microsoft.Reporting.WebForms.ReportViewer rvwReportViewer;
rvwReportViewer.ServerReport.SetParameters(reportParameter);

Then the data table will show within the reportParameter 然后数据表将显示在reportParameter中

Howerver, I want the layer (1) can get and manage RAW DATA by itselft but always make sure that it still connect to database(layer (3)) via Reporting Service (layer (2)). Howerver,我希望图层(1)可以通过itselft获取和管理RAW DATA,但始终确保它仍然通过Reporting Service(第(2)层)连接到数据库(第(3)层)。 No longer need the support from report controls of layer(2) but must engage the architecture 不再需要图层(2)的报表控件的支持,但必须参与架构

In another words, the layer (2) requests and retrieves data from the layer (3), the layer(1) can do it also to get the data from layer(2) then parse that data and display by itselft. 换句话说,层(2)从层(3)请求和检索数据,层(1)也可以从层(2)获得数据,然后解析该数据并由itselft显示。

Can anyone tell me any solution? 谁能告诉我任何解决方案? Any help would be appreciated. 任何帮助,将不胜感激。 Thank in advanced. 谢谢高级。

I suppose this is possible, though I'm unclear as to why you'd want to keep SSRS in this situation? 我想这是可能的,虽然我不清楚你为什么要在这种情况下保持SSRS? Don't suppose this is an XY-Problem ? 不要以为这是一个XY问题 One thing's for sure: this is not a typical setup, so make sure the gain is worth the pain. 有一件事是肯定的:这不是一个典型的设置,所以要确保增益值得痛苦。 (Isn't an ORM or data service a better choice for layer 2 for you?) (对于第2层,ORM或数据服务不是更好的选择吗?)

However, if you insist, what you want is sort of possible. 但是,如果你坚持,你想要什么是可能的。 Output from a report that's executed is always rendered in one format or another. 执行的报告的输出始终以一种或另一种格式呈现。 One setup that may be suited for your situation is have your MVC code connect to the SSRS Web Service API and export the reports to a format that's suited for your processing task in layer 1: probably XML or CSV. 一种可能适合您的情况的设置是让您的MVC代码连接到SSRS Web服务API ,并将报告导出为适合第1层中处理任务的格式:可能是XML或CSV。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将非表数据导入SQL Server Reporting Services? - How do I get non-Table data into SQL Server Reporting Services? 我可以使用Reporting Services从标准的多页Excel模板生成Excel报告吗? - Can I generate Excel reports from a standard, multi-sheet Excel template using Reporting Services? UWP-如何从控件获取字符串资源? - UWP - How can I get strings resources from controls? 如何从不同应用程序中的窗口控件读取数据? - How can I read data from controls on window in a different application? 如何从包含任何容器中的控件的表单中获取所有控件? - How can I get all controls from a Form Including controls in any container? 我如何从Windows服务获取用户桌面路径? - How i can get user desktop path from windows services? 如何在特定时间从服务总线获取消息? - How can I get messages from Services Bus in a specific time? 如何获取命名空间中的所有控件? - How can I get all the controls in a namespace? 从DataTable获取值而不将数据绑定到UI控件? - Get values from DataTable without data binding to UI controls? 如何从窗口中仅获取没有句柄编号的文本? - How can i get from a window only the text without the Handle number?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM