Jan Finell
2007-11-09 13:02:47 UTC
Hi all,
We are using Rave for some of the reports we are creating in our
application. Our customer would now like to have the print setup
dialog translated into their language of choice. I've looked into
using the ShowPrintDialog/ShowPrinterSetupDialog since this would
AFAIK use the standard Windows print setup dialog instead of the Rave
one (this is the preferred solution).
I was able to get the ShowPrinterSetupDialog to work as expected, but
I can't seem to be able to figure out how to use the ShowPrintDialog.
The reason why I'm not happy with the ShowPrinterSetupDialog is that
it does not have the "Print range" option. I'm currently have this
code under a TButton.OnClick event:
RvSys.DefaultDest := rdPrinter;
RvSys.RenderObject := RvRenderPrinter1;
RvSys.SystemSetups := [ssAllowCopies, ssAllowCollate,
ssAllowDuplex, ssAllowDestPreview,
ssAllowDestPrinter, ssAllowDestFile,
ssAllowPrinterSetup, ssAllowPreviewSetup];
if TBaseReport(RvRenderPrinter1).ShowPrinterSetupDialog then
begin
RvRenderPrinter1.IgnoreFileSettings := True;
RvSys.Execute;
end;
Not sure if this is correct way to do it, but at least this works!
Anyway, if I now replace the ShowPrinterSetupDialog with the
ShowPrintDialog, I'll end up with an Access Violation. So my question
is now, how/when should the ShowPrintDialog be called so that it'll
work as intended?
I also noticed when playing around with the RaveDemo that the Print
setup dialog displayed when clicking Print in the Rave Preview UI
differs from the one shown when clicking the 'Print' button on the
main page (RaveDemo.exe). The first one has a print range option
(Pages from...to) whereas the second one does not have this. I could
not find any documentation or examples on how to enable the 'print
range' possibility in the Rave's printer setup dialog?!
Another issue I noticed, is that the "Number of copies" option does
not work at all. Ie. it does not matter what you enter in this box
(using the standard Rave printer setup dialog), it'll always only
print one copy (maybe this is a printer driver problem and not related
to Rave in anyway?!)
We are running Delphi 7 and the Rave version 5.0.8 (on Windows XP/
2000).
I've sent this exact same message (email) to the ***@nevrona.com,
but no reply from them yet.
Cheers,
Jan Finell
We are using Rave for some of the reports we are creating in our
application. Our customer would now like to have the print setup
dialog translated into their language of choice. I've looked into
using the ShowPrintDialog/ShowPrinterSetupDialog since this would
AFAIK use the standard Windows print setup dialog instead of the Rave
one (this is the preferred solution).
I was able to get the ShowPrinterSetupDialog to work as expected, but
I can't seem to be able to figure out how to use the ShowPrintDialog.
The reason why I'm not happy with the ShowPrinterSetupDialog is that
it does not have the "Print range" option. I'm currently have this
code under a TButton.OnClick event:
RvSys.DefaultDest := rdPrinter;
RvSys.RenderObject := RvRenderPrinter1;
RvSys.SystemSetups := [ssAllowCopies, ssAllowCollate,
ssAllowDuplex, ssAllowDestPreview,
ssAllowDestPrinter, ssAllowDestFile,
ssAllowPrinterSetup, ssAllowPreviewSetup];
if TBaseReport(RvRenderPrinter1).ShowPrinterSetupDialog then
begin
RvRenderPrinter1.IgnoreFileSettings := True;
RvSys.Execute;
end;
Not sure if this is correct way to do it, but at least this works!
Anyway, if I now replace the ShowPrinterSetupDialog with the
ShowPrintDialog, I'll end up with an Access Violation. So my question
is now, how/when should the ShowPrintDialog be called so that it'll
work as intended?
I also noticed when playing around with the RaveDemo that the Print
setup dialog displayed when clicking Print in the Rave Preview UI
differs from the one shown when clicking the 'Print' button on the
main page (RaveDemo.exe). The first one has a print range option
(Pages from...to) whereas the second one does not have this. I could
not find any documentation or examples on how to enable the 'print
range' possibility in the Rave's printer setup dialog?!
Another issue I noticed, is that the "Number of copies" option does
not work at all. Ie. it does not matter what you enter in this box
(using the standard Rave printer setup dialog), it'll always only
print one copy (maybe this is a printer driver problem and not related
to Rave in anyway?!)
We are running Delphi 7 and the Rave version 5.0.8 (on Windows XP/
2000).
I've sent this exact same message (email) to the ***@nevrona.com,
but no reply from them yet.
Cheers,
Jan Finell