Jump to content
Changes to the Jaspersoft community edition download ×

Class Error

2005 IR Help

Recommended Posts

By: Flavio Giovanni - fgiovanni

Class Error

2004-03-17 07:33

Hello people..


I create a Class, but this not inicialize the report. Look the code:



public void init() 
String sFileName = "";
if (sFileName != null)
Connection con = DriverManager.getConnection("jdbc:mysql://", "siscart", "bluelau"«»);
HashMap parametros = new HashMap();
String sql_cons = "SELECT * FROM reg_cab WHERE protocolo = 130756";
parametros.put("sql", sql_cons);

jasperReport = (JasperReport)JRLoader.loadObject(new URL(getCodeBase(), sFileName));
jasperPrint = JasperManager.fillReport(jasperReport, parametros, con);
//jasperPrint = JasperFillManager.fillReport(jasperReport, parametros, con);

catch (Exception e)
StringWriter swriter = new StringWriter();
PrintWriter pwriter = new PrintWriter(swriter);
JOptionPane.showMessageDialog(this, swriter.toString());
JOptionPane.showMessageDialog(this, "o caminho nã¯foi especificado"«»);

Post edited by: tcloonan, at: 2006/08/25 05:19

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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