Reporting Services. Different cell width and height - reporting-services

When I use my report on a server, I get normal width and height (CanGrow is True) of the cell.
When I try to save as Excel, I have width of the cell less then I expected.
When I try to save as Word, I have bad cell`s width and height.
Finally when I try to save as pdf, I have normal cell`s width and height, but have a blank page after after each page of the report.
What am I doing wrong?

Exporting SSRS to Excel and Word can produce unexpected (and undesired) behaviours.
Excel
Regarding the export to Excel - according to the answer on this page
Excel itself doesn't really have a concept of CanGrow and CanShrink - rather, all it can do is
keep row heights at a static value (which it will do if both of those properties [CanGrow and CanShrink] are False), or
"snap to fit".
This does mean you are forced, if you want to export the data to excel, to define a static row height for the report
Word
I can recreate your problem - unfortunately this is a "feature" when exporting to Word. The MSDN reference specifically states
Text boxes grow when they contain non-breaking spaces.
PDF
PDFs creating a blank page between report pages is usually an indication that your Report Body is wider than your printed page (in Report Properties). Check your report is not too wide - even if there is no data displayed in the whitespace.

Related

SSRS Export to Excel print format not default to 11x 17 and landscape

On my SSRS report I have set the Report Properties to Landscape, paper size to Tabloid and 17 width by 11 height with 0.25 margin. After I deployed the report and ran it on the web. Followed by exporting to Excel and printed it and it did not come out the format I have set on SSRS. Also, the I have bold the report lines by section based on the group and in Excel the bold report lines are not there.Please advise. I am thinking of moving to Crystal report might solve the problem. Any ideas. Thanks.
This isn't quite how page size works in SSRS. When you set the page size attribute, this will really only effect two things in SSRS.
How the report is displayed online. This is set via the Interactive Page Size setting, and really, only the height matters here.
Page Size sets the page size on the PDF export. We have this because PDFs are supposed to be a portable format, commonly used for printing.
Excel doesn't have this attribute as a part of the file. If you want to print to a specified page size/format, that's all handled at the time of printing by the print dialog.

Change SSRS Report page orientation Dynamically

I'm working on SSRS Reports.
Currently I am facing one issue. I have two tablix in a single Report. Now, Tablix1 or Tablix2 will be visible in either condition.
For example: I am passing One Flag as True then Tablix1 should be visible and for this layout would be Landscape and I am passing Flag Value as False then Tablix2 should be visible and for that layout would be Portrait.
For Show/Hide Tablix I am having solution but what about orientation?
How can I achieve this in SSRS Reports? Can anyone please help me or guide me?
Thanks in advance!!
I can only answer this question in regard to 2012, but it is not possible to achieve this with a single report. Please see my caveat below. In SSRS, you have two properties that determine the size of the report and where breaks should occur. InteractiveSize determines the size of the page when viewed in interactive formats (i.e., RDL or MHTML4.0). For all other report formats (e.g., Word, PDF, Excel, CSV), the PageSize determines the size of the page when viewed in those non-interactive formats.
In SSRS 2012 as well as earlier versions, expressions are not accepted in the InteractiveSize or PageSize fields. This means you cannot reference variables or parameters or field values.
Caveat
I took an existing report I had created with a page size of 8.5" (width) by 11" (height) that is normally two or three pages wide. I then created a blank report and added an 11" x 8.5" subreport pointing to my original report. When I exported this to PDF, I got an 11" (wide) by 8.5" (tall) PDF with the spacing and page breaks as you would expect for a landscape document. However, when I exported to Word, Microsoft Word crashed and burned. This may have something to do with the fact that the PDF exporter uses hard page breaks and the Word exporter uses soft page breaks. In any event, depending on what you need, you may be able to use a single report (i.e., a single place where the logic and datasets are set up once only) and then reference that report as a subreport elsewhere with a different page size. Just be sure to thoroughly test the result in any allowed export formats.
I hope this helps!

SSRS Page Widths

I have an SSRS report with an interactive size of 8.5/11, margins set at 0.25, the page size is set to 8.5/11, the body is 8.0w and the report is 8.0w, but for some reason when I export to excel it doesn't fit on a single page. Any ideas what could be causing this? I have other reports with the same setup that do fit to a page. Same printer setup as the other reports too.
Excel accounts for a very tiny amount of space for the grid separation. So when you export to excel the report is widened and lengthened slightly. Usually its not an issue but if you have a large number of columns in said report the number of separations is going to be greater pushing you over that tipping point. You can do 1 of 2 things. 1. Change the width of your report to account for this space added by excel or 2. export to PDF for printing purposes as it is not going to alter the width of your report and allow for your expected printing outcome.

SSRS limit data size to page size

In SSRS report, the HTML rendering is displaying around 20 records. Now when i generate the PDF, only 5 records are displayed per page. I want that both the HTML renderer and PDF renderer should be same. Is there any workaround for the same?
The different renderers are rendering the report appropriately for their output. The web viewer is optimised for screen-based reading and generally allows more content per page than the print renderer does as the print renderer is constrained by the paper size that it formats to. Thus you get more pages when rendering for printing than web; however, the content of the report is exactly the same.
The best illustration of this is the Excel renderer - the Excel renderer renders the entire report onto a single worksheet in most cases (for reports with grouping and page breaks set on the group footer it will render each group on its own worksheet). You wouldn't want the Excel renderer to artificially create worksheets to try to paginate your report. It does the appropriate thing which is to include all the data in one big worksheet even though that may be logically thought of as one big "page".
The web renderer page length is determined by the InteractiveHeight attribute of the report (in the InteractiveSize property in the Properties pane for the report) but the interactive height is an approximation rather than a fixed page break setting and your page breaks may still not conform to the print version even though the InteractiveHeight is set to the same length as your target page length.
See this discussion of rendering behaviour for more information on why what you are trying to achieve isn't achievable.

How to get rid of the extra blank pages in PDF version of SSRS report?

I tried creating a report using a sub report. When I exported it to PDF I have noticed that there are extra blank pages in the PDF.
I made it clear that body width + left margin+ right margin <= report width.
But still it gives the blank page. sub report as individual working great.
Also I am calling the sub report from with in a list in main report.
I tried to set up a page break after list . but it looks like its not working.
I want the next list displayed on a new page.
How do I achieve these.
There is no single property available for this in SSRS. You have to check for couple of settings
In report properties, set "ConsumeContainerWhitespace" to TRUE
In tablix properties, set page braek location to NONE
IF still the issue persists, check alignment/margin of objects like rectangle,tablix etc.
A few things to look for:
Check the "parent" and subreport for any controls that are in your margins (or may grow into the margins). Setting the width doesn't necessarily force the controls to that width.
check for any controls that overlap. I've had strange things happen because of that (especially in SSRS 2005).
checking the "Print Layout" while previewing helps find most issues like this at design time (before exporting to PDF).
For the hard break with your list not sure what is goofy there. I usually use a table with groups and set the page breaks on the appropriate group. Depends on the data though.
HTH
Check top and Bottom margins, for me reducing.1 of bottom margin solved the issue.
In my case (with Report Builder 2017) the solution to get rid of a blank extra-page was to reduce the width of the body.
The body can be selected by clicking on a free space in the report on the same height than the Tablix is located.
You then get the "Body properties" shown in which you can reduce the size.
The size of the body should be less than page width - left margin - right margin.
For me it was a problem with the sub report's width which caused extra blank pages in the exported version. Reducing the width solved the issue.
If still someone having an issue with blank pages in PDF, just increase the width of the main report to a few inches. Keep reducing to an optimum value by checking the report. No need to change anything else.
For me when I increase the width for pagesize report from 21 to 23 cm,
It was not generating extra empty page. Because of few elements total
size of my report's element was greater than 21 and less than 23, that
is why I changed to 23cm and works for me.
In my case I have only one page and I was working with .rdl file.
When exporting to pdf and the report contains a sub report where the sub report is grouped on an item from parent report.
Do not use the list control in the parent report to group sub report. Use the table control.
The list control will cause blank pages while the table control does not