Abstract Error on print
Hi All
Delphi 2005, RB Ent 9.02
Since upgrading our main app from D5 to D2005 and RB 6.03 to 9.02, we are
seeing an 'Abstract Error' when attempting to print.
We use a custom report explorer and a custom autosearch dialog which
implement the required abstract methods as far as I can see. We are able to
preview but not print.
I have been unable to get my D2005 installation to step through the RB
source successfully without incurring compile errors so I could see where it
was failing.
Can anyone help please.
Cheers, Paul.
Delphi 2005, RB Ent 9.02
Since upgrading our main app from D5 to D2005 and RB 6.03 to 9.02, we are
seeing an 'Abstract Error' when attempting to print.
We use a custom report explorer and a custom autosearch dialog which
implement the required abstract methods as far as I can see. We are able to
preview but not print.
I have been unable to get my D2005 installation to step through the RB
source successfully without incurring compile errors so I could see where it
was failing.
Can anyone help please.
Cheers, Paul.
This discussion has been closed.
Comments
Are you able to recreate the errors without using your custom explorer? If
so please provide me with the exact steps you are taking to creat it or send
a small example in .zip format to support@digital-metaphors.com and I will
try to trace the RB code here.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I have traced the problem to an old ppPDLG file on my library path which I
was using to re-order the print to file device list on the print dialog.
Removing that has cured the problem.
Is there a neater way to re-order the device list? e.g. we use ExtraDevices
and prefer Adobe PDF to appear as the default first choice.
Thanks, Paul.
Unfortunately the list box in the print dialog is not editable. The order
that the devices are listed is the order that they are registered with RB.
It is possible to completely replace the Print Dialog with your own custom
dialog and register that with RB. You would pretty much copy the existing
print dialog and change the order the cbxPrintToFileTypes combo box shows
the devices.
------------------------------------------------------------
Tech Tip: Replacing Built-in Dialogs/Forms in ReportBuilder
------------------------------------------------------------
ReportBuilder has an open architecture for replacing any of the built-in
dialogs. You can replace any of the built-in dialogs by creating a new form
that inherits from an abstract ancestor and then registering it as the new
built-in dialog.
For example to replace ReportBuilder's print dialog you could
1. Create a new Print dialog by renaming ReportBuilder's default print
dialog, then doing a SaveAs to save it under another unit name.
The default dialog resides in RBuilder\Source\ppPDlg.pas and the form is
called ppPrintDialog. You should assign your form a unique name, for
example, myPrintDlg, and save the unit to another name. Also save the unit
to the directory where your other forms are stored (not RBuilder\Source).
2. Make desired changes.
You will notice that the print dialog inherits from an ancestor
TppCustomPrintDialog - this ancestor resides in ppForms.pas (where all the
abstract ancestor forms for ReportBuilder are defined).
3. Register the new form.
Declare an initializtion section at the bottom of the unit:
initialization
ppRegisterForm(TppCustomPrintDialog, TMyPrintDialog);
4. Add the new unit to your project and compile.
Now your preview dialog should be automatically created and destroyed by
ReportBuilder. The two page preview dialog in the
RBuilder\Demos\Reports\Demo.dpro was created this same way. The only
difference is the ppRegisterForm call is in then OnClick event of the
button.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Paul