How Can I avoid Blank pages from SSRS PDF files? - reporting-services

Am creating One report project. Where am having one normal report named (Report1.rdl) and one sub report named (Report2.rdl).
Am calling the main report in side the sub report five times by passing values through parameters. So I have five parameters as well. when parameter value is 0 then respective report will not show in the sub report. But thing is that when am doing this am getting blank pages at the end and between the pages as well.
So can You please help me With this. I have already checked with the sizes and clear designing of the main report.

You are 'calling' the reports in the incorrect order.
Main reports 'call' sub reports, not the the way you have it at the moment. Therefore you need to embed the sub-report inside the Main report. As detailed here on MSDN:
"A subreport is a report item that displays another report inside the
body of a main report. Conceptually, a subreport is similar to a frame
in a Web page. It is used to embed a report within a report."

Related

Don't produce report if there is no data - PDF

I have a report for which there is sometimes no data to output. This report is run along with several other reports and all are then output to PDF. However, this report still produces the header and footer with a blank page even tho there is no data.
I can move the header and footer into the report and have tried to hide those elements with =if(rownumber("PersonalProfile")=0, True, False) in the Hidden property of those elements. It hides everything so now the page is blank, but it will will output a blank PDF. Is there a way to completely suppress the report?
I'm using 2008 and I don't see a Report Visibility property. All the data for the report is inside a single Tablix which is inside a rectangle.
There are 3 datasets: PersonalProfile which contains the meat of the data; BoardNames which just produces the name of the board for the report; BoardMeetings which allows the user to pick a date parameter.
If you are distributing your report using subscriptions and you have Enterprise Edition, then you can look at using Data Driven Subscriptions which will give you control over how and when reports are distributed based on whatever logic you need. Otherwise, there is no way to do what you are asking - as trubs says, Reporting Services must first render the report before it has any knowledge of whether there is any data to display.
You haven't explained how you are "running the reports" (e.g. manually in Report Manager, report subscription, third party app using URL access) - if you do perhaps someone can suggest a workaround.
There is no way to do what you want. ssrs has to produce the report in order to determine there is nothing to display.

How to re-use a common page header to multiple reports using subreports

I need to use the same page header info in all my reports. For this,
--- I created the page header in a report and saved it
--- Now, in my report i added a sub report and chose the above report (step 1) report to use as sub report but it retrieves only the table and not the PAGE HEADER ?
---Could anybody give a solution?

How to export SSRS report having linked reports in to excel

I have a main report main.rdl and 2 linked reports like linked1.rdl and linked2.rdl as a drill through report from the main report.
I have deployed all the reports under one folder in the report server.when i view the main report its working fine and drilling through the linked reports. but my question is how can i export to excel which contains main report as well as linked reports as separate tabs in the same excel?
thanks in advance.
The easiest way to do this would be to put a rectangle on your page and then add your linked report as a subreport inside the rectangle.
then hide the subreports unless exporting to excel by setting the visibility property on the rectangle to
=Globals!RenderFormat.Name<>"EXCEL"
or for ssrs2012
=Globals!RenderFormat.Name<>"EXCELOPENXML"
There are a few problems with this approach. (but these can be solved)
Headers and footers are not shown in sub-report
Performance. The sub reports will run each time you view the main report
the above assumes the drill through reports are only executed with a single set of parameters
imho SSRS is a presentation tool, Excel is also a presentation tool (in this case) so your chaining your presentation tools.
Why don't you call from excel your reports data source and drop it into each tab for each report..main sub whatever.
As your reports should be bound to a named data source (SQL\ view\ sp) for the report you would be calling that.
You can add your main report ....but you cannot add the 2 linked reports, they would show all records. So if you then make your linked reports, reports like main this would then work ie feeding them the key filter field...the children records for linked reports would filter and give you sub tab report you need.
If you cant do this then you have to rethink whole approach... if it was me I would code it so I got all three sets of data and then populated Excel with each tab...save n email spreadsheet

SSRS Where can I place sub reports?

This is not the greatest question, but I have goggled and hunted and pecked for several days and have not found the solution. Where within a SSRS report can a sub-report be placed? Are there any locations that it might seam invisible or be hard to find?
I have created simple sub reports, and can find many tutorials out there for that. This is my problem. I have to update and migrate an old report and its sub reports. I can only find reference to one sub report within the main report or its sub report. The first three pages of the report and the sub report I know of display fine. However on the last two pages of the report there are "Error: Sub report could not be shown." messages displayed.
I have not been able to find any reference to other sub reports. Where else could a reference to a sub report be placed?
The image below has selected a section where I found the reference to the sub report I was able to find. The rest of the areas appear as a "Rectangle" when I right click and I can find no reference to other sup reports in them.
.rdl files are actually XML files generated by the designer. And they usually have a pretty clean structure as well.
You can open these files in a text editor or by right clicking on the file in Visual Studio and selecting "View Code"
There you can use the usual text tools to look for item names. The Names of items can help you figure out what items in the XML map to what in the GUI: when you are back in the designer, you can use the drop down at the top of the properties window to select an item by name and it will be highlighted in the designer window.

First page of SSRS report not rendering on initial load

I've created an SSRS report in Report Builder 3 which contains a single-rowed Tablix that holds a sub report which produces a single report per page. The problem is that when I run the report it doesn't render the first page.
Within Report Builder I can never get this first page to display within the executed report and within the web forms ReportViewer control (v10.0.0.0) I can get this first page to appear when I page away and then back to it. Exporting the report also displays all of the correct data.
This issue has only started occurring since I made some slight changes to the layout of the sub report. I've checked the visibility on the tablix, group, row, sub report and all the other settings that I thought might be responsible, but they haven't changed since it was previously working.
I've also tried recreating both the tablix and the entire outer report based on an answer to a similar question and this didn't make a difference.
Any help with this issue would be much appreciated.
I was passing the data for my sub reports through as parameters to prevent the need to call 5000+ single line select statements, and it looks like they need a data set to execute to render correctly on the initial load. Previously, I had mistakenly left a data set within the report, which I must have removed when making the layout changes.
Creating a dummy data set with SELECT ' ' AS Dummy and then using that to populate a text box seemingly fixed the issue. It's not a clean solution but it works.