Jump to content

JasperViewer problem


marianela

Recommended Posts

Hi all¡¡

 

I really hope that somebody can help me with this...

Since my boss put the application, where I'm deploying my reports, into the server, my reports doesn't work anymore... I mean, I have a .jspx (JDeveloper 10.1.3.1)page that has links that when the client click on one of them it supposed to show the report...

The code that I'm using to deploy the reports is something like:

Code:

public void rptPagosPen (String pEstado) {

PreparedStatement st = getDBTransaction().createPreparedStatement("commit",1);
Connection conn;
String strAux = new String(path);
strAux = strAux.concat("\rptPagosPen.jrxml"«»);
try
{
conn = st.getConnection();
st.close();

JasperReport jasperReport;
jasperReport = JasperCompileManager.compileReport(strAux);
Map parameters = new HashMap();
parameters.put("SUBREPORT_DIR",path);
parameters.put("pEstado", pEstado);


JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
/*JasperViewer reporte = new JasperViewer(jasperPrint, false);
reporte.setTitle("Listado de Pagos Pendientes"«»);
reporte.show();*/
JasperViewer.viewReport(jasperPrint, false);

} catch (SQLException e) {
// TODO
}
catch (JRException e) {
// TODO
}
}

 

But like I said nothing happend... no even an error message, is like the JasperViewer is generated but isn't send to the client or something¡¡¡¡ :ohmy:

 

I really don't know what could be wrong..:( But I really have to find the solution pretty soon because my bos is lossing his patience :unsure:

 

Please.... If someone knows the answer... I'll really appreciate the help...

 

I was thinking that maybe I suppose to use JRViewer instead... but I'm not sure how to do that...

 

Pleaseeeeee¡¡¡¡¡

 

Thanks a lot in advanced,

Regards,

Nelita

Post edited by: marianela, at: 2007/02/05 20:01

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi everyone¡¡¡

 

I'm a new using JasReports and IReports, and I'm facing the same problem...I don't know how to solve this....

 

Please if somebody has any idea/suggestion/example or something. I'll be greatfull...

 

Thanks in advance...

Cheers,

Nelis

Link to comment
Share on other sites

Hi,

 

No wonder you don't see any exception!

You have a try/catch statement block there big enough to catch an elephant with. No exception could escape that and you silently ignore all of them.

 

I already replied you to this question you posted on this other thread:

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=20835&catid=8

 

You don't seem to understand that the JasperViewer is a Swing-based component which is launched within the JVM that runs your application. If you use it inside a web application, the viewer will be started on the server machine, because there you have your Java Virtual Machine running your application. Nothing runs on the client machine, because on the client machine there is only the browser.

Your only chance to deliver reports to the client using the Swing viewer would be to use it as an applet. Another solution would be to deliver reports to the browser in HTML or PDF format. All these solutions are demonstrated in the /demo/sample/webapp sample, but to told me you already looked there and you were not able to find the solution to your problem.

In such case, I'm afraid there is nothing else we could do to help.

 

Thank you,

Teodor

Link to comment
Share on other sites

Hi,

 

Has u get the solution for your question? Because i think i have the same question with yours. I am new to jasper, i have a j2ee application running in a server, and now i need another reporting server as a repository for my reports, but i got no idea on how to run the reports in the reporting server and view it in the client machine. Your reply might help me a lot, thanks a lot.

 

Regards,

Bohseng.

Link to comment
Share on other sites

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