Jump to content
We've recently updated our Privacy Statement, available here ×

JasperReports and RMI


2004 IR Help

Recommended Posts

By: ct_spo - ct_spo

JasperReports and RMI

2005-06-16 16:28

What I'm trying to do is have my server program generate the JasperPrint object and then return it to my client program which will display the report. The problem occurs on the server side when I try to fill the report with data. No exception is thrown. The program just hangs at the line JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);

 

Here is a sample of the rest of the code running on my server.

 

 

public JasperPrint getReport()

{

try

{

URL fileURL = new URL("http://.../TestReport2.jasper");

Map parameters = new HashMap();

JRLoader jrLoader = new JRLoader();

JasperReport jasperReport = (JasperReport)jrLoader.loadObject(fileURL);

Class.forName(driver).newInstance();

Connection conn = DriverManager.getConnection(url, login, password);

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);

return jasperPrint;

}

catch(Exception ex)

{

System.out.println(ex);

return null;

}

}

 

Any help will be greatly appreciated. Thank you.

 

 

 

 

 

By: C-Box - c-box

RE: JasperReports and RMI

2005-06-17 05:11

Well, I'd use "ex.printStackTrace" or throw the exception. I don't believe that there isn't ANY exception at all. So just throw it or use the printStackTrace, that should appear in your Server.log of (e.g. JBoss)

 

hth

C-Box

 

 

 

 

By: ct_spo - ct_spo

RE: JasperReports and RMI

2005-06-17 12:51

Wouldn't the try and catch block display any exception? It looks like processing just stops once it reaches the JasperFillManager.fillReport(..) command.

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