Jump to content

Recommended Posts

Hello.. i am still a newbie in using jasper report. Now, i am trying to create a report with iReport using netbeans. when i try to run the program from netbeans, there is nothing wrong with the report and the jasper viewer is showed up. but after i clean and build the program and try to run it from the jar file, the viewer is not showing. i already try to use JRviewer and add it to a jFrame but still nothing showed up. 

this is the list of the library i am using :

- Oracle jdbc 11.jar

- Groovy 3.0.6. jar

- Common Digester 2.1 .jar

- Commons Logging 1.2 .jar

- Commons Bean Utils 1.9.4 jar

- Commons JavaFlow 1209105.jar

- Commons Collections 4 - 4.4 .jar

- POI 3.15 .jar

- Jasper Reports 6.19.0 .jar

- JDK 15

and i am using ireport plugin version 4.8.0.nbm

i already try using InputStream / file and it still not working

            clsDBSConnection conn= new clsDBSConnection(); 
            conn.openConnection();


            InputStream st = getClass().getResourceAsStream("/XB/Reports/irpAgingStock_1.jrxml");
            JasperDesign jd = JRXmlLoader.load(st);     
            JasperReport jrp = JasperCompileManager.compileReport(jd);          
            HashMap hash = new HashMap();
            JasperPrint jprint = JasperFillManager.fillReport(jrp, hash, conn.getConnection());
            
            JasperViewer jView = new JasperViewer(jprint);
            jView.setVisible(true);

and i am already try to check if the jasper print is null or not using this :

          if(jprint.getPages().isEmpty()){
               JOptionPane.showMessageDialog(null, 
                "No Data", 
                "Warning", 
                JOptionPane.ERROR_MESSAGE);

            }else{
                JasperViewer.viewReport(jprint, false);                
            }

and still nothing is showed up. and there is no error at all.

but there is some warning like this 

converted-file.png.82a4b2c01c2715ff8a362134fb5af5df.png

but the report can run normally when compiled from netbeans.

and if there is something wrong with the combination of library. can you suggest me about the library combination,  what library should i use and what version?

Anyone can help me?
 

Thanks a lot, Hans

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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...