简体   繁体   English

如何分发SSRS报告?

[英]How to distribute a SSRS report?

(distinction, I'm talking about distributing a report--not deploying a report to a report server) (区分,我是在谈论分发报告,而不是将报告部署到报告服务器)

To our product we've recently added support for it so it can dump various stats to a database (mssql server). 在我们的产品中,我们最近添加了对它的支持,因此它可以将各种统计信息转储到数据库(mssql服务器)中。 Since then, I've made reports (where the datasource is my own sql server). 从那时起,我就制作了报告(数据源是我自己的sql服务器)。 But if I want to get these reports into the hands of customers (pointing to their own database, obviously) so they don't need to make their own (or if they don't want/can't make their own) is there a good way to do this? 但是,如果我想将这些报告交到客户手中(显然是指向他们自己的数据库),那么他们就不需要自己做(或者如果他们不想/自己不能做)一个好的方法吗?

I'd rather not have to give instructions on how to use the report creator and have them copy/paste what I've done nor have them open it and change the datasource. 我宁愿不必提供有关如何使用报表创建器的说明,也不必让他们复制/粘贴我所做的事情,也不必让他们打开它并更改数据源。 I'm completely new to using SSRS and don't know any of its intricacies. 我对使用SSRS完全陌生,也不知道其复杂性。 I know I can query the database to see what reports are available, is there a way to just add an entire report to the database via code (c# or java)? 我知道我可以查询数据库以查看可用的报告,是否可以通过代码(C#或Java)将整个报告添加到数据库中?

Assuming that they have SSRS installed and configured, and assuming that their DB (tables, SPs etc.) match your report - one of the way this could be done is: 假设他们已经安装并配置了SSRS,并假设他们的数据库(表,SP等)与您的报告相匹配-可以这样做的方法之一是:

  1. When creating your report use a shared datasource (don't use one embedded into report) 创建报告时,请使用共享数据源(请勿使用嵌入到报告中的数据源)
  2. Ask a customer to create shared data source in their SSRS instance under the same name , but pointing to their DB 要求客户在其SSRS实例中以相同的名称创建共享数据源,但指向其数据库
  3. Profit! 利润! That's it, all you have to to is to give them the RDL file, they will upload it to their SSRS. 就是这样,您要做的就是为他们提供RDL文件,他们会将其上传到他们的SSRS。 It will use shared datasource they provided to pull data from their DB 它将使用他们提供的共享数据源从数据库中提取数据

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM