I need help, I have problom using iReport

S

sahm

HI every no

I have problom with this code
this code for create report in java using iReport

///////////////////////////////////////////////

String reportSource = "./src/test_db/report/templates/
HelloReportWorld.jrxml";
String reportDest = "./src/test_db/report/results/
HelloReportWorld.html";


Map<String, Object> params = new HashMap<String, Object>();
JOptionPane.showMessageDialog(this, "NO. 3");

try
{
JasperReport jasperReport =
JasperCompileManager.compileReport(reportSource);

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
params, new JREmptyDataSource());

JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);


JasperViewer.viewReport(jasperPrint);
}

catch (JRException ex)
{
JOptionPane.showMessageDialog(this, ex.toString());
}

////////////////////////////////////////

when I run the code this error is showing
<<< net.sf.jasperreports.engine.JRException: Error Compiling java
Source files: E:\Salim\Project\test_DB
\HelloReportWorld_1184573407625.java >>>

and I do not have any file with this name
(HelloReportWorld_1184573407625.java)

Best Salim
 
D

Dorian

This line:

JasperReport jasperReport =
JasperCompileManager.compileReport(reportSource);

is going to convert a .jrxml file into a Java source file and compile
it to create a .jasper (same as a .class) file. It sound like either a
compilers if not available in your environment (are you using a JDK) or
your .jrxml contains java code snippets that are invalid.

D.
 
S

sahm

This line:

JasperReport jasperReport =
JasperCompileManager.compileReport(reportSource);

is going to convert a .jrxml file into a Java source file and compile
it to create a .jasper (same as a .class) file. It sound like either a
compilers if not available in your environment (are you using a JDK) or
your .jrxml contains java code snippets that are invalid.

D.










http://www.newsfeeds.comThe #1 Newsgroup Service in the World! >100,000 Newsgroups

No It is J2SE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top