Anders Balslev
2007-05-19 11:14:18 UTC
I'm using BDS2006 and RaveReport 6.5.0 (BE)
Can anyone give a small hint regarding hiding af page?
I have a report - Report1
In this report I have defined 3 pages, each of them contains a text "Page x
of y"
When I execute this it works fine.
But dependant of the application, I want to disable / enable page 2
I have tried to execute following code on the OnBefore page event:
if (....) then
Self.visible :=False;
and
if (....) then
Self.Hide;
and in my Delphi code, I execute following:
var
MyPage : TRavePage
Begin
Project1.Open
MyPage :=Project1.ProjMan.FindRaveComponent('MyReport.Page2',nil)
if (...) then
MyPage.Hide
Project1.execute;
Project1.Close
end;
All the result is:
I still get 3 pages, but page 2 is blank !! (instead of not to be printed)
What I want is:
If Page 2 is to be printed, all pages must have page x of y
If page 2 is *not* to be printed, all the printed pages (and no blank pages)
should have page x of y (and the total pages y should of course not include
the page that is not to be printed
Any hint?
Best regards
Anders
Can anyone give a small hint regarding hiding af page?
I have a report - Report1
In this report I have defined 3 pages, each of them contains a text "Page x
of y"
When I execute this it works fine.
But dependant of the application, I want to disable / enable page 2
I have tried to execute following code on the OnBefore page event:
if (....) then
Self.visible :=False;
and
if (....) then
Self.Hide;
and in my Delphi code, I execute following:
var
MyPage : TRavePage
Begin
Project1.Open
MyPage :=Project1.ProjMan.FindRaveComponent('MyReport.Page2',nil)
if (...) then
MyPage.Hide
Project1.execute;
Project1.Close
end;
All the result is:
I still get 3 pages, but page 2 is blank !! (instead of not to be printed)
What I want is:
If Page 2 is to be printed, all pages must have page x of y
If page 2 is *not* to be printed, all the printed pages (and no blank pages)
should have page x of y (and the total pages y should of course not include
the page that is not to be printed
Any hint?
Best regards
Anders