Report .pdf direct to file

Hi me again,

Is it possible to write a report directly to a file (pdf) without a preview?


Try turning preview on in the template.
In the embeditor, search for SELF.SkipPreview = false
In the first embed point after that, insert


Hi Thanks,

Somehow it seems read-only, changes are note saved.


Include ReportToPDF in the Global Templates (which will include ReportToPDF in each report in the app)

This adds a ‘Report Targets’ tab on the Report Properties dialog (if it doesn’t show up, generate your app again).

For the report you wish to always go to PDF:

Go to the Report Properties dialog and select the ‘Report Targets’ tab.
Change the ‘Report Target:’ drop-down to ‘Other’
Change the ‘Other Target:’ drop-down to PDF

In the ‘Print Preview’ tab, you’ll want to set ‘Runtime skip preview’ to True (don’t turn off ‘Print Preview’ in the General tab).

You may also want to look at the settings on the ReportToPDF extension for the report you are re-targeting to set things like the output file name, etc.

Hi Ben,

Thanks for your answer. In this case the Save as still pops up. I want to write the report direct to disk with a variable file name.


Call the SetFileName method for the PDFReportGenerator class in your report procedure.

Next setting work for me:


  • general:
    print preview checked
  • report targets:
    report target: Other
    other target: PDF
  • preview options:
    print preview: i use pdf_print variable here

Extensions REPORT TO PDF:

  • report to PDF:
    populate: always
    output name: variable
    file name: my_pdf_name


  • general:
    populate conditional
    conditional my_pdf_name<>’’

Of course there if one big problem with this settings, report always go to pdf, i cannot get print when needed although i get print preview. If you put Ask at runtime under Report target you can choose print or email pdf but i need silent email send and print when needed. Any ideas?

Hello, I would like to insert the function Report to PDF in my application. But I can’t find the extension in the template. Is it already included with the purchase of Clarion 11.1 or do I have to purchase the template where? Thank you for your help and reply. Best regards Walter

It is included with Enterprise Edition. It is an additional purchase otherwise.

FYI. The wPDFControl DLL wrapper template from KlariSoft lets you print directly to a PDF file, without doing a preview or getting a Save As dialog.