Change deployment location of SSRS report and sub-reports

◇◆丶佛笑我妖孽 提交于 2019-12-11 16:53:00

问题


  1. I need to change the destination of an SSRS report in Visual Studio 2010 so that when I deploy it, it goes to the correct folder. There appear to be about 6 or 10 places where I can change options, I just cannot seem to find the right place to change these deployment options.

  2. On this particular report, there are two subreports. I would like to deploy these two reports to a separate (subfolder) under the folder which contains the main report. I assume that the changes I make in #1 are for SSRS, not for a particular report (is that correct). If so, I will need to change the path for those subreports as well.

  3. Once I have the reports deployed to the correct folders, how do I change the path to these subreports in the Visual Studio report designer? Right now, the reports render properly in the report designer, but when I go to the report server and run the main report, the subreports do not render properly.

I expect this report, along with its sub-reports to render properly from the report server.


回答1:


You can only change the deployment path in the project properties, so this affects all reports. I did try to setup a similar scenario to what you want bit to be honest it was more trouble than it was worth.

What I ended up doing was having all subreport names start with an underscore and then running a quick bit of t-sql to hide them. I don't have access to the server now but the t-sql is something like

USE ReportServer
UPDATE dbo.Catalog SET Hidden = 1 WHERE LEFT(Name, 1) = '_'

The other way you can do this is to dump all the reports in the same folder but don't give users access to it. Then Create a new folder and add linked reports in there that point back to the original versions, you can do this using the Web Portal (report manage in older versions). It's a pain as you have to do each report individually. You could probably write a script to create the catalog items for you but I've not tried that so can't comment on how easy that would be.




回答2:


So, saving the subreports to a different folder was straight forward, once I figured out where the project properties were located. Once I deployed those to subreports, all I had to do was change the path to those subreports in the design view of the main report.

Right click on the sub-report, select subreport properties and enter the full path to the sub-report.



来源:https://stackoverflow.com/questions/56977805/change-deployment-location-of-ssrs-report-and-sub-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!