Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Report Preview in PDF from JSF page
Report Preview in PDF from JSF page [message #1771249] Wed, 23 August 2017 11:28
Priom Biswas is currently offline Priom BiswasFriend
Messages: 1
Registered: August 2017
Junior Member

Currently I am developing an application which will show BIRT Report when user clicks preview report button.
Following is my java code for pdf generation.
private String rptFileLocation = "D:/Java Development/Projects/CustomerSubReport.rptdesign";
    private String pdfDownloadLocation = "E://logs/customer_subreport.pdf";
public void previewReportInPdf(String rptFileLocation, String pdfDownloadLocation) throws EngineException{
        IReportEngine engine = null;
        EngineConfig config = null;
            config = new EngineConfig();
            config.setLogConfig("E://logs", Level.FINEST);
            IReportEngineFactory factory = 
            engine = factory.createReportEngine(config);
            IReportRunnable design = null;
            design = engine.openReportDesign(rptFileLocation);
            IRunAndRenderTask task = engine.createRunAndRenderTask(design);
            PDFRenderOption options = new PDFRenderOption();
        catch(Exception ex){

Following is the jsf code segment
<h:commandButton value="Preview Report(PDF)" action="#{birtBean.previewReportInPdf()}" ></h:commandButton>

Currently the pdf is downloading in the specified path of my disk. I want to display the report as pdf in new browser tab. How can I achieve this?
Previous Topic:Suppress printing of the line at the top of a PDF
Next Topic:BIRT: Problems with DataSets/data is not displayed in several reports
Goto Forum:

Current Time: Sat Jul 11 04:35:04 GMT 2020

Powered by FUDForum. Page generated in 0.01975 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top