Multiple report generation and export to PDF

Hi!

I have noticed some sort of glitch within FR4 rendering system. May be its not a glitch ... just missing some setup values here - really don't know therefore I am asking if someone else also noticed such behavior of FR4.

I am building software which will generate PDF based reports. Basically background thread cycles through records and generates report for each record. Note that everything is happening in multiple background threads. Each report contains company logo image in PNG and information from database. The problem is that not always FR4 rendering engine outputs this PNG image correctly. To be more specific out of 292 reports generated 38 were rendered without image the rest were OK. The image is statically placed into template.

All objects are created dynamically.
Settings for frxReport.EngineOptions are
EnableThreadSafe := true;
UseGlobalDataSetList := false;
DoublePass := true;
UseFileCache := false;

The question is ... has someone also stumbled on such behavior ?! and if so is there a solution to bypass it and make engine render images correctly without skipping them ?!

Thanks.

Comments

  • edited 6:50PM
    Okey, so I probably have found the thing which is affecting this behavior. If you launch background thread which is rendering reports, can be even multiple threads, doesn`t matter, and at the same time you have open UI form which is constantly redrawing then you can observe that background thread which renders everything not always draws the image. Once you minimize form so that there is no redraw events happening then everything renders just fine without problems. Template must contain image from my tests it does not matter either it is JPEG image or PNG tested with both and the results are the same.

    Options that I setup for this test are:
    PDF Export filter:
    - ShowDialog := false
    - ShowProgress := false
    - Background := true

    ReportEngine:
    - DoublePass := true
    - SilentMode := true
    - EnableThreadSafe := true
    - UseGlobalDataSetList := false;

    Observation can be done by looking on file size. If you render the same template with the same data all the time then file size should always be +/- the same differing by some bytes only. But once engine did not render image file size differs dramatically and these files stand out.

    For testing purposes report does not even need to contain data. It is enough with band "Report Title" and one or two image components.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.