Jump to content
Changes to the Jaspersoft community edition download ×

.xml file compiled but no .jasper file


2005 IR Help

Recommended Posts

By: sven-loe - sven-loe

.xml file compiled but no .jasper file

2004-04-21 01:15

Hello,

 

I have taken a samlpe file modified it a bit and got it to run. Now I tried to do a real report and the .xml file compiled ok, but then I got an Exception that there is no .jasper file. I am using the Version 0.5.2 and the code looks like this:

 

String fileName = "Umsaetze";

 

try {

long start = System.currentTimeMillis();

//Compile

JasperCompileManager.compileReportToFile(fileName + ".xml");

System.err.println(

"Compile time : " + (System.currentTimeMillis() - start));

 

//Preparing parameters

Map parameters = new HashMap();

parameters.put("ReportTitle", fileName+" Report");

//Fill

JasperReport jasperReport =

(JasperReport) JRLoader.loadObject(fileName + ".jasper");

 

The Exception is thrown in the last line and as I understand it compileReportToFile() should have made a .jasper file or thrown a Exception. I hope somebody has an Idea because I am stuck.

 

Greetings

Sven

 

 

 

 

By: sven-loe - sven-loe

RE: .xml file compiled but no .jasper file

2004-04-21 02:24

Hello,

 

I reply to myself because I solved the problem. I forgot to change the name of the report in the .xml file in the <jasperReport> tag. This tag defines the name of all the output files!

 

Greetings

Sven

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