Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Printing a BIRT report

  1. #1
    Join Date
    Jul 2006

    Default Printing a BIRT report


    The sample action report-to-printer.xaction coming from the "samples" solution (of the demo Pentaho installation), with path "printing", prints well a JFreeReport report.
    In this action components used are, in this order, the PrintComponent and the JFreeReportComponent component.

    First, I am surprised of this order: as we have actions executed, I thougth that we have to first generate report, and then print it!

    So I try to do the same thing with a BIRT report (that display a simple string): when executing action, I can choose the printer I want to print on, but the report is not sent to the selected printer, and is just displayed!
    I've joined the action file I use.

    I would appreciate any help.

    Thank you !
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2003


    The print-component does not print in that case. The component is only used to query the available printers and to let the user select the printer by name. That name is then passed over to the report-engine, which controls the printer directly.

    (Generating the report first, holding it in memory and letting the separate print-component do the actual output is (1) highly complicated if you want vector-images and (2) extremely expensive as you have to hold all pages in memory and cannot stream directly to the printer. It certainly does not work for reports that spit out a couple of thousand of pages (not that it would make sense to do this, but in the past I've seen a lot of reports that made no sense to me that were used in the real-world, so I assume nothing anymore). Spooling to a file is less complicated, but assumes that the printer-spooler understands the file's contents and is still less efficient than directly rendering to the printer.)

    So any sane reporting engine will control the printer directly and will feed the printing system using their own optimized mechanisms. We (Pentaho Reporting) do it, Jasper Reports does it, and I'm pretty sure Birt could do it as well.

    However, from looking at the sources for the Birt-component there seems to be no direct printing possible, so I guess you have to first generate a PDF file and then let the Print-Component print that file. Not very efficient, but should work if your printer-spooler is able to handle PDF or Postscript input.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.