Jump to content
Changes to the Jaspersoft community edition download ×

48/5000 How to call a book report in java application


Recommended Posts

Good afternoon people.

Please need a help from you, I would get to know how to call the book report in my java application, I tried in several ways to call the page but it goes blank does not generate error only does not output the information


help me Follow my code


private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {                                                          try{                        String sql = "SELECT *FROM produto";                        Statement stmt22 = con.createStatement();            ResultSet rs22 = stmt22.executeQuery(sql);                                    JRResultSetDataSource jrRS = new JRResultSetDataSource(rs22);            JasperPrint jasperPrint = JasperFillManager.fillReport("C:/Relatorios/OrcamentoDSP.jasper", new HashMap(),jrRS);            JasperViewer.viewReport(jasperPrint,false);                    }catch(Exception ex){            JOptionPane.showMessageDialog(null, "deu erro"+ex);        }            }       [/code]



Link to comment
Share on other sites

  • 3 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I have the same issue. Other reports / subreports work fine but report books are always blank without errors. I also have datasource defined which seemed to be the problem for others.

Does anyone have an idea why report books can't be exported with java?

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...