This is a migrated thread and some comments may be shown as answers.

custom report orientation - landscape / column width

1 Answer 514 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 03 Sep 2013, 04:01 PM
Hi, am trying to generate custom on the fly report with landscape or portrait orientation (user selection during runtime). The fields should auto adjust to the page size accordingly. Any idea how to accomplish this? 

Here's what I did without much success-
1. create a report with custom size (i.e. width 8.5 and length 11, default is portrait)
2. create panels for header and details. dock the fields to left or right of the panels. am assuming the fields should stick to the edges of panel if page resized
3. in code ... I did the following to change the orientation to landscape (didnt work)

 

 

.PageSettings.Landscape = True
.PageSettings.PaperSize = New Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(11.0R), Telerik.Reporting.Drawing.Unit.Inch(8.5R))
.Panel1.Width = New Telerik.Reporting.Drawing.Unit(10, Telerik.Reporting.Drawing.UnitType.Inch)
.Panel2.Width = New Telerik.Reporting.Drawing.Unit(7, Telerik.Reporting.Drawing.UnitType.Inch)
.Width = Telerik.Reporting.Drawing.Unit.Inch(11.0R)

Thanks.

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 06 Sep 2013, 01:41 PM
Hi Tony,

Items will preserve their position and sizes regardless the used PageSettings.Landscape. If you need to adjust their sizes according to the page orientation, you can add bindings to their Size properties depending on the selected PageSettings.Landscape.

For more details, please take a look at the attached sample report definition created with Telerik Reporting Q2 2013 SP1 version 7.1.13.802. In older versions you may need to add a custom function to perform the resizng.

Since your report definition is created dynamically, use the report designer to create a sample layout with the needed bindings and reuse the generated code.

If you need further, please elaborate on the scenario and required items resizing.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Tony
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or