Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.java.programmer > #5568

I need help in JasperReport

From sahm <sahm007@gmail.com>
Newsgroups comp.lang.java.programmer
Subject I need help in JasperReport
Date 2011-06-22 23:02 -0700
Organization http://groups.google.com
Message-ID <7605562c-c812-455e-8c44-df5c672b9e9b@q1g2000vbj.googlegroups.com> (permalink)

Show all headers | View raw


Hi every one;
I'm trying to call Jasper Report form Java
but in my code when I try to call Jasper Report nothing happen
this is my code
//////////////////////////////////////////////////////////////
 try
        {
            infoClass ipc = new infoClass();
            Class.forName("com.mysql.jdbc.Driver");
            Connection con;
            con = DriverManager.getConnection("jdbc:mysql://" + ipc.ip
+ "/" + ipc.db,ipc.user,ipc.ps);
             JOptionPane.showMessageDialog(this, "Massage 2");
            JasperReport report;
            JOptionPane.showMessageDialog(this, "Massage 3");
            report=
JasperCompileManager.compileReport("Department_report.jrxml");
            JOptionPane.showMessageDialog(this, "Massage 4");
            JasperPrint print = JasperFillManager.fillReport(report,
null,con);
            JRViewer viewer = new JRViewer(print);
            viewer.setOpaque(true);
            viewer.setVisible(true);
        }

        catch(SQLException se)
        {
            JOptionPane.showMessageDialog(this, se.toString(), "SQL
Error", JOptionPane.ERROR_MESSAGE);
        }
        catch(Exception e)
        {
            JOptionPane.showMessageDialog(this, e.toString(), "Error",
JOptionPane.ERROR_MESSAGE);
        }
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

the code it work until "Massage 3 and stop working

Best
Salim

Back to comp.lang.java.programmer | Previous | Next | Find similar


Thread

I need help in JasperReport sahm <sahm007@gmail.com> - 2011-06-22 23:02 -0700

csiph-web