EOutOfResources when exporting to PDF
I'm doing lots of tests to see if I can move from D2007 + RB 10 to
DelphiXE3 + RB 14.
I'm facing the following problem: In a report, I have a summary band
with 2 TppRichText:
ppRich1: stretch = true
ppRich2: stretch = true; shiftrelative to ppRich1
if ppRich1 is blank, when I try to export to PDF, I get an error of "Out
of System Resources".
After some debugging, I found that it exports fine if ppRich1 content is
not empty OR if I set ppRich1.MinHeight to any value different from zero.
Is this a known bug? Any solution for this?
Also, I noticed that when I export a report to PDF (from the Report
Preview window), the next time I call the report.print method, the
preview window is not displayed anymore... it opens direct the printer
selection dialog. In RB 10 it works as desired. Why?
Thanks!
Carlos
DelphiXE3 + RB 14.
I'm facing the following problem: In a report, I have a summary band
with 2 TppRichText:
ppRich1: stretch = true
ppRich2: stretch = true; shiftrelative to ppRich1
if ppRich1 is blank, when I try to export to PDF, I get an error of "Out
of System Resources".
After some debugging, I found that it exports fine if ppRich1 content is
not empty OR if I set ppRich1.MinHeight to any value different from zero.
Is this a known bug? Any solution for this?
Also, I noticed that when I export a report to PDF (from the Report
Preview window), the next time I call the report.print method, the
preview window is not displayed anymore... it opens direct the printer
selection dialog. In RB 10 it works as desired. Why?
Thanks!
Carlos
This discussion has been closed.
Comments
1. Please send a simple example of this in .zip format to
support@digital-metaphors.com and I'll take a look at it for you.
2. Are you using a custom previewer? How are you exporting to PDF
directly from the Preview?
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ok, I'll prepare and send to your email.
No customer previewer. I'm using the default Preview, click the print
button, mark the "Print to file option", choose PDF and file name. After
closing the preview dialog, any further call to the ppreport.print
method doesnt open the Preview anymore, and goes direct to the print dialog.
Carlos
As far as I can see, after "Printing to PDF" from the default report
preview, the DefaultDeviceType is changed from Screen to Printer. That's
why the next call to ppReport.Print doesnt show the preview window. I
guess this behavior is wrong, since previous RB versions kept the Device
as it was before (Screen).
Ie:
ShowMessage(ppReport1.DeviceType); // Shows Screen
ppReport1.Print; // Opens the preview windows, and I export to PDF
ShowMessage(ppReport1.DeviceType); // Shows Printer
Any patch to solve this?
Carlos
Which exact version of ReportBuilder are you using?
Below is the simple test I performed with expected results. Please
alter my steps so that I can reproduce this issue on my machine.
1. Create a new project. Place a TppReport and TButton on the form.
2. Set AllowPrintToFile to True.
3. Call Report.Print from the Button OnClick event.
4. Run the application, click the button to open the preview.
5. Click the Print button in the preview to open the Print Dialog.
Select to export the report to PDF. Press OK.
6. Close the report.
7. Click the button on the form again. Preview opens as expected.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm testing with 14.07 Pro. So, it seems that 14.08 has solved the
problem, since I can reproduce it in 14.07 following the same steps as you.
PS: I'm still trying to make a simple app to reproduce the
OutofResources errors. Seems that there is something more needed to
reproduce the problem than just settings the properties as I listed before.
Thanks,
Carlos