Charlie
Charlie

Reputation: 10307

SSRS report page break issue

I have a problem with page breaks in an SSRS report, and I'm by no means an expert. This is in the XML mark up to provide a page break:

<TableGroups>
  <TableGroup>
    <Grouping Name="AdjustmentPageBreakGroup">
      <PageBreakAtEnd>true</PageBreakAtEnd>
      <GroupExpressions>
        <GroupExpression>=CInt(Ceiling(RowNumber(Nothing)/28))</GroupExpression>
      </GroupExpressions>
    </Grouping>
  </TableGroup>
</TableGroups>

The page break appears on different lines on the print and screen version of the report:

Print:

alt text

Screen:

enter image description here

As you can see, the print version has a break in the middle of the "Transfer IN" cell, with "Value" on the next page after the break. From what I can tell from the XML, it's got a hardcoded page break at row 28, and if I change this number it fixes the print version and breaks the screen version. Is there any way to specify this line break differently for print and screen?

Upvotes: 2

Views: 19554

Answers (3)

Reeves
Reeves

Reputation: 736

You can solve this problem by using few small steps:

1-Go to report properties and set paper size to custom. The width and length is to be as such, that it will show all column : enter image description here

2- Then set the Body Property like same : enter image description here

Now View the report and download in any PDF/Any format it will not break:

enter image description here

Upvotes: 1

StrateSQL
StrateSQL

Reputation: 473

The solution to this issue is the rectangle component. Based on your image, I am assuming that your report has a table that is grouped on location. For each location you are reporting on Number and Value. Column 1 has the location name, Column 2 is the label and Column 3 is the field values.

Create a new table (TABLE A). Set the table to group on Location. In the group footer, add a rectangle (RECTANGLE). Set the Keep Contents Together property of the rectangle to TRUE.

Add a table to the area of the rectangle (TABLE B). Do not add a grouping to TABLE B. Add to the details row of this table Column 1, Column 2, and Column 3 formatted as it is in the existing report.

When the report renders, each group will be kept together and the rectangle will force page breaks between the groupings.

The solution above works for SSRS 2008. The solution below is similar and works for SSRS 2005.

Create a new table (TABLE A). Set the table to group on Location. In the group header or footer add a table (TABLE B). Do not add a grouping to TABLE B. Add to the details row of this table Column 1, Column 2, and Column 3 formatted as it is in the existing report. On the TABLE B use the Fir table on one page if possible option.

Upvotes: 1

zzawaideh
zzawaideh

Reputation: 2011

Make sure the interactive size and the page size are the same. You also have to set the margins so that the print version prints properly.

Upvotes: 0

Related Questions