Change printer for cached pages
At the print report from cache the tray of printer got out incorrectly. I
defined reason as cossack villages were cached to view of report. To
correct a situation I was able as follows:
ppProd.pas:
procedure TppProducer.PrinterSetupChanged;
var
i: Integer;
aPage: TppPage;
begin
if (FPublisher <> nil) and (FPublisher.PageCount > 0) then
begin
for i := 0 to FPublisher.PageCount - 1 do
begin
aPage := FPublisher.Pages[i];
if aPage <> nil then
aPage.PrinterSetup := PrinterSetup;
end;
end;
end; {procedure, PrinterSetupChanged}
?
--- posted by geoForum on http://delphi.newswhat.com
defined reason as cossack villages were cached to view of report. To
correct a situation I was able as follows:
ppProd.pas:
procedure TppProducer.PrinterSetupChanged;
var
i: Integer;
aPage: TppPage;
begin
if (FPublisher <> nil) and (FPublisher.PageCount > 0) then
begin
for i := 0 to FPublisher.PageCount - 1 do
begin
aPage := FPublisher.Pages[i];
if aPage <> nil then
aPage.PrinterSetup := PrinterSetup;
end;
end;
end; {procedure, PrinterSetupChanged}
?
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
- Please post to the newsgroups using your real name. Thanks for following
the newsgroup guidelines.
http://www.digital-metaphors.com/support/newsgroups.html
- Please explain more about what you are trying to accomplish. You should
not need to modify the RB source code.
- To simplify things, you can specify the Report.PrinterSetup properties
prior to generating the report.
- If RB internally detects that the printer has changed, it will call
Report.Publisher.Clear and Engine.Reset. You can manually do the same if you
need to regenerate the pages.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com