Paging Report


Pagination support depends on a rendering extension. PDF and TIFF (Image) formats are page oriented and allow you to precisely set page properties. HTML and Microsoft Excel are not page oriented. CSV and XML do not support pagination and ignore pagination properties.

SSRS provides several properties to support pagination: PageBreakAtEnd , PageBreakAtStart , PageHeight , PageWidth , InteractiveHeight , and InteractiveWidth .

PageHeight and PageWidth

These properties are used to control physical page sizing for PDF- and image-rendering extensions to insert page breaks based on the value of those properties. These properties accept strings in the format {FloatingNumber}.{unit designator} , where a unit designator could be: in , mm , cm , pt , and pc .

InteractiveHeight and InteractiveWidth

These properties are used for logical page sizing by the HTML- and Excel-rendering extensions. HTML allows specifying interactive page size that creates interactive breaks and allows navigating through pages, using a toolbar. Excel-rendering extensions insert "soft" page breaks into the resulting spreadsheet (can be seen through the Excel menu View Page Breaks). Both HTML and Excel pages are based on approximate page size and provide less precise page breaks than page-oriented formats. These properties are similar in format to PageHeight/Width . You can disable soft page breaks by setting InteractiveHeight to 0. However, if the report contains a large amount of data, this might negatively impact perceived performancethe user will not see a report until rendering of all data is complete.

PageBreakAtEnd and PageBreakAtStart

Setting these properties to true allows report designers to add page breaks at the beginning or the end of a rectangle, table, matrix, list, chart, or group . To take advantage of these properties, the following approach is often used:

  • Create a group with the grouping expression

     =System.Math.Ceiling(RowNumber(Nothing)/{Number of Rows per page}) 
  • Set PageBreakAtEndProperty = true

  • Repeat table column headers by setting the table property

  • Set RepeatHeaderOnNewPage = TRue

To dynamically adjust the number of rows in a page, a developer can pass a report parameter and use the following group expression:

 =System.Math.Floor(RowNumber(Nothing)/(Parameters!RowsPerPage.Value)). 

For physical page formatting, the PageBreak property adds page breaks in addition to those controlled by PageHeight and PageWidth . For example, when a report is rendered to Excel, this property breaks down the report to individual sheets. For HTML rendering, if PageBreakAtEnd and PageBreakAtStart are supplied, Interactive Height and Weight are ignored.

There are differences between different renderers on the amount of data included in a rendered report. For example, if a designer uses the toggle action, the PDF report renderer does not include a collapsed section, whereas the Excel renderer includes all sections, including collapsed ones, and provides an interface similar to the toggle action.

HTML pagination is based on current visibility. If a part of a report is collapsed, it will be included on the page if it fits in a collapsed state, even though expanding this section will take its size outside of the intended page size.

Pagination might improve perceived performance of a reportthe first page will be rendered and presented to a user while SSRS continues rendering the remaining pages.

To access a particular page of a report, add the following to the URL:

 &rc:Section={PageNumber}. 



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net