Some of the page numbers are repeated when exporting to word - reporting-services

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.

Related

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

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.

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.

Crystal Reports 11 - Useless blank page is added with just group headers that have data

I have a weird problem I have never seen before using Crystal Reports.
I built a complex PDF monthly report for a bank that generates over 200 pages. The specifications took months to adjust with the client but it works perfectly now, showing all the data it's supposed to, all sorted right and with the right headers.
But for some reason the report inserts quasi-blank pages rarely and seemingly randomly before it shows data. These pages aren't entirely blank, all my headers including group headers show, but no details. The correct data shows up a couple of pages later but these useless pages keep popping up in the report no matter what I do with Section Expert. To be clear the headers and the details aren't separated. The headers also display fine in the page with the right data, they just duplicate to the extra blank pages before that.
Here is a sample:
NO "insert blank page" box is checked in any of my sections except the uppermost level of data, which works fine, but these extra pages are not inserted at the end of each group for that level. They are inserted randomly sometimes right in the middle of a coherent section.
I also verified the "Keep Together" option, and it is checked for the 4 lowest levels including the details, so I considered data too big to fit on the same page with its headers but the probleme is rare, random and the data overflows perfectly when it does appear (as on page 3 in my example).
And checking all those boxes off didn't change anything.
There are no suppression formulas and the only suppressed sections are GH1 and GH2, but they are suppressed all the time, unconditionally. I tried adding a conditionnal suppression formula to the headers if there is no data, but the problem is, there is data. The headers just seem to be duplicated uselessly.
The problem doesn't seem tied to any specific change in header value. In my example it changes when the report hits Common Stock Equities for a certain portfolio but doesn't occur when another portfolio displays its Common Stock. And I check the data in my data source, everything is consistent between the rows of data that this happens to and those that don't.
I ran out of ideas on how to get rid of these extra pages. Anyone know what's happening in my report?
Thanks a bunch.
Try toggling 'Keep Group Together' for the groups to see if it has any effect. You'll find the option by right clicking on the group, choose 'Change Group' (to bring up the Group Expert), and on options tab.
This option is often overlooked since 'Keep Together' in the Section Expert is more visible.
(You may also want to look at turning off 'Keep Together' to see how that affects your report)

Different odd/even pages in MS Access reports

For a report in MS Access (2007) I need to put data of some columns on all odd pages and other columns on all even pages. It is for printing out double sided card files onto sheets of paper.
Does somebody have an idea how to do that?
Your question is too general. I would suggest you have all columns in all pages, and then add some code to the page header section (or even in the detail section) "On Format" to change the .Visible property of your Detail text boxes depending on the page number.
I think you'll need to have a Text Box in the page header or footer with "=[Page]" as source data in order to know the correct page number. My Access report knowledge might be severely outdated, though.
Well you can check whether "Page" is odd or even in an "On Format" event and maker columns visible or not visible depending on which page you are on. However, it would be far easier to:
Put in a couple of sections and put in a new page between them. Then it's just a matter of ensuring that you don't overflow the page with too many rows per card.
OR
Make the report wide enough that it forces a second page and then place those columns on a second page (i.e. the back of the first page). As I recall access's print order is left right top bottom, so pages set up like this:
A B
C D
would print like this:
A
B
C
D
In the case of having to display data from the same record on two consecutive pages, this is the option I would choose.
You could alternatively use a pair of queries, printing the first to side A, and the second to side B, perhaps?