It's possible to change page orientation in script?

edited 7:59PM in FastReport VCL 5
Hi everyone.

I have a report, on which are GroupHeader.
GroupHeader has Child band.
Child have one component a DBCross .

Before print a group header I prepare data, which will I print on Child band in DBCross component.

Depending on the amount of data, in DBCross component are less or more columns.

And here is my problem.

I would like change page orientation, depending on the count of colums.
For example:

if CountOfColumns > 14 then
page.orientation := poLandscape
else
page.orientation := poPortiaint;


I placed this code in event onBeforePrint of GroupHeader component.

Unfortunately, I see that this don't work.

It's possible to change page orientation in this way?


Thanks for answer!
Piotr





Comments

  • gpigpi
    edited 7:59PM
    You may change page's orientation before preparing of report or in the main procedure of the script

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.