Custom Preview Orientation
Helo,
I've made a custom preview with a page orientation combo on it.
Everything works fine but there is some strange behaveour on with the
detail band.
Let say i have 100 records, 4 pages with 25 records on a portait page.
when i change to a landscape page i'll see 20 records. But when i go to page
2 it start with record 26 and not 21.
When i start with a landscape page i'll see 20 record and change it to
portrait i'll see 25 and on page 2 i'll start with record 21.
I hope i made myself clear. I've tried many thing nothing worked.
The code i use when change orientation :
procedure TfrmPreview.cbOrientationChange(Sender: TObject);
begin
case cbOrientation.ItemIndex of
0 : TppReport(Report).PrinterSetup.Orientation := poPortrait;
1 : TppReport(Report).PrinterSetup.Orientation := poLandscape;
end;
TppReport(Report).Reset;
ppViewer1.Reset;
TppReport(Report).PrintToDevices;
end;
Any solutions ???
Thx,
Rene.
I've made a custom preview with a page orientation combo on it.
Everything works fine but there is some strange behaveour on with the
detail band.
Let say i have 100 records, 4 pages with 25 records on a portait page.
when i change to a landscape page i'll see 20 records. But when i go to page
2 it start with record 26 and not 21.
When i start with a landscape page i'll see 20 record and change it to
portrait i'll see 25 and on page 2 i'll start with record 21.
I hope i made myself clear. I've tried many thing nothing worked.
The code i use when change orientation :
procedure TfrmPreview.cbOrientationChange(Sender: TObject);
begin
case cbOrientation.ItemIndex of
0 : TppReport(Report).PrinterSetup.Orientation := poPortrait;
1 : TppReport(Report).PrinterSetup.Orientation := poLandscape;
end;
TppReport(Report).Reset;
ppViewer1.Reset;
TppReport(Report).PrintToDevices;
end;
Any solutions ???
Thx,
Rene.
This discussion has been closed.
Comments
Cancel as well, which will clear the report cache.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Do you know any other solution ??
Thx
Rene
Try calling Report.Engine.Reset
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
That did it.
Thank you very much.
Thx
Rene