Jump to content

In debug ok, but in real-time nothing


yurish

Recommended Posts

I'm generating reports with runReportToPdfStream method. When i'm debugging, everything is ok, but when i'm just executing my code, i can't get my report(The page cannot be displayed). I discovered, that this thing happens, when my report is very small(4 kB ). Any suggestions, what that might be? With large reports everything ok.

 

Looks like code in streaming is executing before report runs.

 

Code:
jasperDesign = JRXmlLoader.load(jrxmlDir+jrxml);
JasperCompileManager.compileReportToFile(jasperDesign,fileName);
InputStream fileStream =new DataInputStream(new FileInputStream(fileName));
JasperRunManager.runReportToPdfStream(fileStream, servletOutputStream, map, dataSource);
servletOutputStream.flush();
servletOutputStream.close();
fileStream.close();
File file = new File(fileName);
file.delete();

 

variable filename is .jasper file.

 

Help? :blush: :unsure: :unsure:

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

I don't know how to reproduce this. Now i set

Code:
Thread.sleep(1000) to my code. Everything is fine. Mb some king of bug, cause i'm not using the last version of JasperReports. Now it is fine. 

 

Conf of our application is:

 

Java 1.4.2

Struts Framework 1.1

Jasperreports 1.2.8

iReport 1.2.8

IE6

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