SSRS Calling a Subreport in Footer Through a URL - reporting-services

I have several SSRS reports that all need to have the same footer, a payment stub.
Rather than have the footer recreated for each report, I want to have the footer as it's own report, and included as an independent subreport.
The problem, is you can't put a subreport in a footer in SSRS. So my idea is to make the footer an image called by a URL, and the URL is the subreport sitting on the SSRS server.
So if the subreport URL is this:
http://localhost/ReportServer?/TAS/Reports/STUBTEST/REP90016&rc:PageHeight=3.7in&rc:PageWidth=8.5in&rs:format=IMAGE&rc:OutputFormat=JPEG&rs:Command=Render&rc:Parameters=Collapsed&P_ACC_ID=1&P_DATE=7-MAY-2020&P_PROP_ADDRESS=%27123%20Fake%20St%27&P_AMOUNT_DUE=1.78
And I put the above URL as the image URL, it does show the image I want in the footer in Visual Studio when I preview the report. However when I move the report to the SSRS server, and call the report as a PDF, the footer is blank.
Any ideas how I can achieve this?

My solution was this:
Create a webservice that will call the URL for the subreport and covert it to base64 string.
In the main report, put some code in a function that creates a webrequest to the above ws and returns the string.
In the main report footer, create and image that calls the above function and convert it from a bass64 string to show the subreport as an image.

Related

Subreport as a header in main report (with page numbering)

I'm facing an odd issue: I'm going to create lots of reports using reporting services (SSRS) and one request was to create a subreport that will be shown as a header in main report. I've come across two main problems:
It is not possible to insert subreports into report headers. I thought of a possible workaround and just create a subreport without header and then insert subreport on top of body in main report. But then I faced another problem:
My header contains a logo, title and page number. However, function for page numbering cannot be used in report body, only in header.
Is there any alternative? Or should i just add a header to each report instead of trying to create a subreport for the header?
You can start by using a report with the header as a template. You would start with this whenever you make a new report. That at least eliminates the need to recreate it each time.
If you do want to be able to manage the headers dynamically, you can use a data-driven approach. Almost all of the properties for images and text boxes can be defined with expressions. And the expressions can refer to a dataset. In other words, you can store all of your preferences in a table. Your header template would include a dataset that brings in all the settings. Then you can use expressions to define how the header will look.
By doing this, you would be able to adjust the image, font size, etc. in all the headers at once just by changing a value in your table. Obviously there is some overhead with setting up the template this way, but it has a negligible performance impact and gives you more power to manage the header dynamically.

How to do SSRS Document Map bookmarking for subreports

I have a SSRS solution with several subreports in one report. Client needs bookmark(in PDF) for each subreport as shown below.
Left section shows SSRS design page with textboxes and subreports stacked . Right side shows the result we need to achieve.
I tried the below link to set DocumentMap. But could find a solution how to apply this for subreports.
https://www.mssqltips.com/sqlservertip/3504/sql-server-reporting-services-bookmarks-and-document-maps/
Any help on this is greatly appreciated.
If you just need a map entry to point to your subreport then you can set this by simply clicking on the subreport from your main report and setting the DocumentMapLabel property
If you need your document map to point to specific parts of your subreport that requires a bit more effort but still pretty simple. You have to setup a document map within the subreport. This will then be nested in the main report's document map.

Export SSRS report along with drilldown

I have an SSRS report that has a drilldown sub-report. How can I include the drilldown subreports along with the main report when exporting to PDF? Thanks
When exporting report into PDF, if you want to display the subreport, you can only expand the subreport part and then export. I don't think there's any workaround on this goal because the render behavior of PDF file is just like a snapshot of the report. And in PDF, there's no function which support expand/collapse page or part of context within a page.
Try this,
=iif(Globals!RenderFormat.Name="PDF",FALSE,TRUE)
This may be helpful- http://www.techbrothersit.com/2015/10/ssrs-tutorial-part-124-export-ssrs.html

SSRS subreport instead of reportfooter

I am working on a report that has variable coulmns and the report looks fine in preview.
But now I want to add a "Hazardous Notice" like a report footer but via using subreport.
And this Notice will be only having TEXT in it (no columns and rows)
I am able to drag the subreport from the tools beneath my main Matrix, but I am really confused that how can I get only TEXT in that HAZARDOUS NOTICE.. as it asks me to add parameters in it. Do I need to create a Parameter for that or not.. Please Help!!!

Put subreport with paging in footer

We have about 100 different reports. All of them have the same footer, which contains a Page Number, and maybe some other text. The footer design may change regularly.
So now, for exmaple, if we want to change the footer from "Page 1 of 5" to "P. 1/5", this has to be done for each report, i.e. 100 times.
I would like to be able to put a Subreport in the footer instead, and then only one change will be needed. However, SSRS won't let you insert a Subreport in the footer (CrystalReports let's you do that).
What can be done?
If you're using SQL Server 2008 R2 and Report Builder, you could create your footer details inside a rectangle and publish that rectangle as a Report Part. You would then just need to open reports in Report Builder and run a "Check for Updates" to update the footer.