Hi, I created a report and I have 333 rows in the database. I want to display only 15 rows per page in my reportviewer control. Please give me a solution. Also, is it support the fiter functionality as in microsoft reportviewer control. Thanks in advance
1 Answer, 1 is accepted
0
Svetoslav
Telerik team
answered on 02 Jun 2007, 12:34 PM
Hello Revathy,
At the current moment the number or the sections (rows) that are rendered on one page depends on the page size of the report (Report.PageSetting.PageSize), and on the height of the sections (that depends on the total height of their child items). This means that depending on the data you're displaying on one page, you can have to set 5 details, but on the other just 3 (suppose you have a TextBox that should display a very large text and its TextBox.CanGrow is true).
That's also exactly how the Image (and what you see in the WinForms ReportViewer) and PDF rendering engines do the paging.
The HTML/MHTML engines (and what you see at the WebForms ReportViewer) work slightly different as we cannot calculate the actual item size on the server. Here the number of rows is constant and it is calculated from the height of the printable area of the page (this is the height of the whole page without the top and bottom margins) and the height of the sections on the current page.
The bottom line is that the best is to experiment several combinations of report layout according to your data to make the report looks best.
Currently you should filter the data before processing the report. You can use a parametrized query or filter the data after acquisition from the data base. To ensure that you've filtered the data you can handle the Report.NeedDataSource event. This event is raised when the reporting engine is about to process (data bind) the report and only if you've never assigned the Report.DataSource property (it is null / Nothing in VB.NET). An example of how to filter the data in the Report.NeedDataSource event, you can review the MasterDetail example from the sample ReportLibrary project.