1. I'm working on a school java project using Netbeans IDE.

  2. I need to display IReport in a JPanel Placed inside a JFrame with a button Click.

  3. To Create the IReport I used ReportView Class downloaded from the Internet & in the button click Event I have following code.

    HashMap para = new HashMap();
    para.put("id", pt); // Passing Paramter to the Report
    ReportView rv = new ReportView("PATH OF THE .JASPER",para); // using ReportView Class
    java.awt.Container cont = rv.getContentPane();
    JPanel1.add(cont);
    

-- Problem is it displays nothing. but, when parameter is supplied wrong it shows 'The Document has no pages' Error.

Somebody Pls Help.

Try it on Tabbed Pane it will helps this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.