Business Intelligence Blogs

View blogs by industry experts on topics such as SSAS, SSIS, SSRS, Power BI, Performance Tuning, Azure, Big Data and much more! You can also sign up to post your own business intelligence blog.

Myth: Can you return sub-reports from other report projects?


Hey Folks, in this continuation of this blog series we will
try to figure out another myth. Today we will investigate and try to determine
if it’s possible to use a report from another project as a sub-report.

In my current SSRS report project I have 2 reports. However,
I would like to be able to use another report called IsAlive from another
report project called Number5. This should be easy enough because all I have to
do is add a sub-report and reference the third report.


As you can see from the image above when I add a sub-report
to my Johnny5 report you can see that we’re limited to only the reports from
within our current SSRS project.

Luckily for us though we can reference SSRS reports from
other projects as long as they have been deployed out to the report server. So
in our current report we can reference this third report using a relative path.
You can set up the relative path in the ReportName of the sub-report properties
as shown below.


So now go ahead a preview your report. Even if you did
everything correctly you will see an error message similar to mine below.



So our myth isn’t looking to good is it? However, what
happens when we deploy our new report to the report server?


It should work if all of the reports have been deployed to
the report server and all of the relative paths are correct.  In my example the sub-report is just an image.


A quick review, I have a report that we just created called
Johnny5 that has been deployed to a folder named ShortCircuit on the report
server. I have another report that was already created called IsAlive that has
been deployed to another folder named Number5 on the report server. In the
Johnny5 report we referenced this third report (IsAlive) using the relative
path in the sub-report properties.


Myth confirmed, you can use reports as sub-reports from
other projects.




Categories: SQL Server
Rate this article:


Other posts by ChrisAlbrektson

Please login or register to post comments.