I am using a Custom Datatable as the report DataSource. I am trying to allow the user to select what page size they want. So if I have 32 records they can display those on 4 pages or all on one page. Is that currently doable? Is there a property I can use to do that?
thanks,
3 Answers, 1 is accepted
0
Svetoslav
Telerik team
answered on 10 Aug 2007, 08:34 AM
Hello eric,
You can set the size of the report pages through the Report.PageSetting property.
If you're using the Windows Forms ReportViewer it has built-in functionality that allows the end-users to modify the page setting through the standard Page Setting dialog (that respects the actual printer setting on the client side).
The case with the Web ReprotViewer is a bit different. Since the viewer does not provide any similar functionality it is up to you to provide the needed UI for the end-users to let them select the page size. After that you need to re-render the current report with the new page settings - reloading the page with the viewer will cause the viewer to render the report discarding all previous renderings.
Is there a way to force all the records to be displayed on one page? It would look simular to a web page where you can scroll down through all the records instead of having to page through the records. thanks,
0
Svetoslav
Telerik team
answered on 16 Aug 2007, 11:41 AM
Hello eric,
Just make the page height enough to fit all data:
report1.PageSetting.PaperKind = PaperKind.Custom; report1.PageSetting.PaperSize = new SizeU(Unit.Inch(20), Unit.Inch(10000));
The code above sets your report to use custom paper 20 in by width and 10,000 in by height. Of course you have to adjust width/height according to your data and report layout.