Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BIRT Reports - How to schedule them and send by email?

I am currently creating reports with Eclipse embedded Report Designer for BIRT reports. In my next step, I would like to schedule this reports in such a way:

  1. It will run once per day on a set time.
  2. It will be produced as PDF.
  3. It will be sent by email to a concrete email address.

I am working on Windows. Is it possible to do all of that by running bash script as a scheduled task in Windows Task Scheduler? Thanks.

like image 653
MichalB Avatar asked Oct 23 '14 07:10

MichalB


1 Answers

You can either do this yourself with the free BIRT runtime or download the free BIRT iHub F-Type server at http://www.actuate.com/resources/product-downloads/.

How to use the BIRT runtime:

  1. Download the BIRT runtime and install it. http://download.eclipse.org/birt/downloads/#runtime
  2. Test the runtime installation (if you use Windows it will look like the following)

    C:\birt\ReportEngine>echo %BIRT_HOME%
    C:\birt
    
    C:\birt\ReportEngine>genReport.bat
    
    C:\birt\ReportEngine>ECHO off
    Help for ReportRunner
    
    --mode/-m [run|render|runrender] [options] [rptdesign|rptdocument]
        The default mode is runrender.
    To see options for run mode, use:
        --help/-h run
    To see options for render mode, use:
        --help/-h render
    To see options for runrender mode, use:
        --help/-h runrender
    Print current message, use --help/-h
    
  3. Test the runtime in console with a job like

    C:\birt\ReportEngine>genReport.bat -o test.pdf -f PDF new_report.rptdesign
    
  4. Create a batch file for your job (the sample you ran earlier).

  5. In Windows Task Scheduler, make a task to run the batch file for your job.
  6. Run your task on demand to make sure it runs correctly.

Windows task scheduler does have a simple email function but you will probably have to find a better program to send the generated file as email. Then add the script to run this program to your batch file. Make sure you read up on how to configure a task for Windows task scheduler correctly.

like image 174
user3660637 Avatar answered Sep 30 '22 02:09

user3660637