SSRS Tablix Group Reset Page Number and Page Name not working when Exported to Word - reporting-services

I have a SSRS (.rdl) report with a tablix whose details group is set to put a page break between group items, reset the page number and set the page name (as per http://blogs.msdn.com/b/robertbruckner/archive/2010/04/25/report-design-reset-page-number-on-group.aspx).
This works correctly when rendered to HTML or as a PDF.
When rendered to Word the page numbers do not reset and the page name never changes (the page name is always the value set on the first page). The page breaks work as expected.
I have read (at https://msdn.microsoft.com/en-us/library/dd283105.aspx#ReportHeadersFooters) that complex expressions must be converted into runs of simple expressions in order to display correctly when exporting to Word. I have done this but the problem persists.
Is there any way to make the tablix group reset page number and page name functionality work when exporting to Word?
If not is there a way of achieving the same effect when exporting a report to Word from SSRS?

This is an older question but recently ran into this issue myself so it might help someone else.
There are a lot of examples out there that use casting in the examples for the page number display (CStr or ToString()). Whenever I invoked those methods, the counts would be off when exporting to Word (either doc or docx).
The only way I could get it to work is with three separate text boxes in the footer with these expressions:
=Globals!PageNumber
"of"
=Globals!TotalPages
Avoid the use of those other approaches. Three separate text boxes was the only way I could get this to work.

Related

SharePoint (lists) - Multiline clamping (display only the first line)

I have a column that contains multiline data and I am trying to keep only the first line visible and hide the rest so I can have a nice displayed list with minimum gap between the lines. Ideally a JSON script to customize the column formatting. I tried to keep only a certain number of characters visible, works but then again the problem is that when you open the record, the information in that multiline field is not showing but only the number of characters we limited to be displayed in the first place.
I was thinking about putting the value of the first line in a different column (single line text) and have the rest in a different column, that i can just hide. but when i hide that column, i am not able to use my power automate flow as it detects that it is not available (...) if i can get that to work then my problem is resolved.
Appreciate everyone's inpu
There is no such function to hide a part of the multiline. We can only show or hide the whole item in the column. SharePoint will display top 5 lines and hide the others as default.
Elaborating on the comment: Power Automate does not have to work with the view that the user sees in the SharePoint browser interface. You can create a new view in SharePoint and include only the columns you need for the workflow. Give the view a nice, descriptive name.
Then, in Power Automate you can use the Get Items command and under Advanced options > Limit Columns by View specify which view you want to use to return the list items. In the screenshot, I'm using a view I called wfView. This will return the columns of that view, plus some of the SharePoint default fluff.

SSRS not rendering all page breaks in PDF export

I have a report is ssrs, it consist of a main report which has a header containing the page number and 2 sub reports (report page 1 and report page 2) within a tablix. Report page one comes first, then report page 2 displays on the next page after the end of report page 1. The subreports can be anywhere from 1-3 pages. The page numbering is reset between each set of report page 1 and 2 (so if page 1 is 3 pages and page 2 is 2 pages, it goes from page 1-5, then resets). These are called for each record (with grouping) from the main reports' query. The report is around 1000 pages total. It renders perfectly on screen, but when I try to export to PDF, it will sometimes (like 1 time in the 1000 pages) display part of report page 2 on a page (as expected, the page number matches with it), then it will start printing report page 1 of the next group on the same page.
Here is the layout of the main report:
Here is the document outline for better understanding:
And here is the page that is wrong...
This is what it should look like (the last page of sub-report page 2 even has just the total record like the broken one!
I have tried everything I can think of. I have tried (i think) every combination of page breaks on the rectangles and groups, I have tried making a tablix with 2 rows using the same group and again tried every combination of page breaks. I have tried changing the number of records on a page. I have tried changing the consume whitespace option on both sub and main reports. I have tried adding both calculated and random amounts of white space. I have recreated the report from scratch a couple times. I'm sure there's more, but it would be like going through a full feature list of SSRS... Basically, I tried everything I could think of, then everything suggested in the links on the first page of about 10 different google searches. I just have no idea what is going on with this, any help would be greatly appreciated!
Let me know if you need any more info, screenshots, or whatever and I will try to provide. It may be highly "redacted", but I will provide anything I can.
Thanks, Kevin
Try check the setting "Between each instance of a group" in group properties of tablix.
Try checking your XML for empty TablixRows (which will not show up in the Document Outline). I found with my report that empty tablix rows screw up page breaks in subsequent rows / sub reports when exported to PDF. Where possible hide the TablixRows or insert and empty text box.
This appears to be a bug with SSRS when editing the XML by hand. The Visual Studio GUI seems to not let you delete the last element in a row - perhaps this is a work around. An error or schema validation message would have been nice for us hand coders!
Hope this helps.

ssrs display multiple documents

We have several RDL's that that are designed using textbox's to display data as a document to be converted to PDF or printed directly. There is no table involved in the RDL's. I am trying to get one of the RDL's to display multiple documents by passing a dataset of multiple DocumentId but it only appears to display the first document. I figure there must be a setting to force a page break on the actual dataset or page itself but I have not found one yet. Does anyone know of such a feature of SSRS 2008?
I would recommend putting the textbox in lists and have the list group on Documentid. This should fix your issue. If you want it to be shown on a separate page you should be able to select page break between groups.

Some of the page numbers are repeated when exporting to word

I have a report with 50 pages. I have one list control, and this list control contains a table control. I am using grouping in the list, with a page break at the end. I want each group on one page. For example, if the size of my data is bit more for some of the pages then it moves to the second page.
The problem is I am getting some of the pages with the same number where data for one group is more than one page. I am using this expression in the footer:
format(Globals!PageNumber & "of" & Globals!TotalPages)
When I have 50 pages then after exporting to Word I will get 45, becuase 5 or 6 pages will be repeated, giving "1 of 45" instead of "1 of 50".
Note that I am using SSRS 2005.
This is an older question but recently ran into this issue myself so it might help someone else.
There are a lot of examples out there that use casting in the examples for the page number display (CStr or ToString()). Whenever I invoked those methods, the counts would be off when exporting to Word (either doc or docx).
The only way I could get it to work is with three separate text boxes in the footer with these expressions:
=Globals!PageNumber
"of"
=Globals!TotalPages
Avoid the use of those other approaches (including the wrapping Format function -- I don't think that's doing anything). Three separate text boxes was the only way I could get this to work.

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.