How can I change the body size during report generation? - reporting-services

So I have 1 report, and I need two different version of it when I export to Excel and export to PDF.
I already know how to hide certain report items depending on it being PDF or Excel, but the other problem I'm having is that the table I'm hiding is very wide.
It's for the excel version of the report, which is fine. However, the PDF version of the report now has blank pages because the body of the report is bigger than portrait page size.
Any ideas?

After an exhaustive search, i've basically come to the conclusion that "no, you can't"

Related

How to add additional rows and text when export excel in SSRS

When export excel in ssrs, it is showing the exact report downloaded in excel. But I need some customisation to add additional rows and text above the downloaded excel, not in original report. Please guide me.
Not sure this is feasible or not.
This site having some kind of code, but not sure it can work for my need or not. https://reportsyouneed.com/export-excel-without-making-mess/
Add all the elements you need to your report, the hide the ones you only want showing in Excel by setting the hidden property based on the render format.
So you can do things like
=Globals!RenderFormat.IsInteractive
If the above was used as the Hidden property expression it would hide an the item if you were viewing in an interactive session.
You can also do this...
=NOT(Globals!RenderFormat.Name = "Excel")
This would show and element only if the report was rendered as Excel.

SSRS Report PDF image rendering issue

I am building a label report that requires the user to input a Bulk Order Number that will generate multiple labels. When viewed in preview mode and on the report server, images on the report for postage and company logo appear on every instance of a label (report page).
However when exported to PDF, these images only render on the first label (page)
I considered this may not be an issue, as the user could print from the report server when accessing the report. This isn't the case, as when trying to print, report server creates a PDF for you to print from. There are no other options regarding printing other than page size and orientation, a PDF seems to be the only method from which you can print from.
The images I use have the visibility controlled by parameters, so you can select 1st or 2nd class postage, and choose to have the logo visible.
Each image also has the RepeatWith property set to the Tablix that contains order and address details.
When exported to word, the labels all appear as desired with postage and/or logo images on each instance. This is a step I would like to avoid, as it would be much nicer to have the user print directly from the report server, even if this still requires a printer friendly PDF to be created.
I have attached am image to show PDF output.
Any ideas how I can get these images to render on each label (page)?
EDIT
Image of design page
Based on the design view image you posted, it looks like the only thing repeating is your tablix containing the address information. The SSRS RepeatWith property doesn't seem to work well with .pdf exports so the workaround for this would be to drop everything into a single cell on a list object and grouping using the Order_No to repeat everything. This should remove the need to mess with RepeatWith and give you the desired results.

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!

Dataset Field in Header/Footer disappears in PDF Export

I've been asked to make a small change to one of our RDLs. Essentially, I have some fields in my header/footer which pull information out of the resulting dataset (this is done by creating hidden textbox in the report body, then creating a textbox in the footer with its value set to ReportItems!txtHiddenMsg.Value).
Unfortunately, the message in the footer is dynamic: it displays a customerID and a custom "Thank you for your business" message in the customer's native language in the footer, and there are several customer IDs contained in the report, so the footer text actually changes from page to page. This means its not possible to hard code the text in the footer or bind it to a different dataset.
The report renders just fine in ReportViewer, but the fields disappear when exported to PDF. I don't know how to phrase this problem, so I apologize if this is worded awkardly:
How can I bind a field in the header/footer to a dataset field and without the field disappearing from the PDF export?
Unfortunately, the only solution that may work is aspose.pdf
PDF export appears to not detect the indirection.
My BI colleague tried this and found it better than the standard solution.
I did some detective work and found that several of our other reports bind columns to the header/footer, and they export just fine. It seems like my report is the exception rather than the norm.
Cause of the problem: The row containing my hidden textboxes was set to invisible (I did this so I wouldn't have to toggle the textboxes individually). It seems like there is a bug undocumented feature in the PDF export where it ignores text in invisible rows.
Solution: I made the row visible and set all of my textboxes to be invisible. Now the report outputs fine, and the export looks fine as well.
Try to use hidden/internal report parameter with default values set to read from dataset.