DBReport new feature: Render to PDF


Merry Christmas and Happy New Year!

Another Year, another code!

In this time i write about new feature for DBReport: Render to PDF.

I know you can “Print” a report to virtual printer but in some cases you need create PDF files programmatically; by example in WebApp, so i wrote a DBReportPDF class it’s based on other projects i found on internet so is Free to use (don’t need a product key to use) and works alone (don’t need others classes).

Code Example:

Dim rpt As New DBReport(f, rs)
Dim fPDF as FolderItem= SpecialFolder.Desktop.Child( “DBReportExample2.pdf” )
rpt.RenderToPDF fPDF

This are some limitations for DBReportPDF:

  • Fonts may not be embedded. (not fully implemented yet)
  • The Underline property is not yet implemented.

By default it use zlib compression (ready on MacOS and Linux) , zlib1.dll is included on Windows, you need “boundle” this file.

In the future i support DynaPDF for PDF render Engine.

Is possible don’t use DBReportPDF just set constant kRenderEngineDBReportPDF to False on DBReportShared module and delete DBReportPDF* classes.

You can see a video here.

You can download the component here or here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s