It's possible to change page orientation in script?
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
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