Jump to content
Changes to the Jaspersoft community edition download ×

Help Subreport

2004 IR Help

Recommended Posts

By: raf78 - raffeo

Help Subreport

2005-11-11 05:00

Hi! Sorry for my English.

I create a report with a subreport in Ireport.

I compile and run it and it's ok

After i create a java class to can print master report

but when i compile i receive this error

Error loading object from file : c:test.jasper

Test.jasper is subreport jasper file

My Java code is

public void print_report(ResultSet tmp_res)



String xmlFileName =


jasperFileName =


JRDataSource jrds = new JRResultSetDataSource(


try {


// JasperCompileManager.compileReportToFile(xmlFileName,

// jasperFileName);


catch (JRException ex1)





HashMap map = new HashMap();



net.sf.jasperreports.engine.JasperPrint print = null;

try {



print = JasperFillManager.fillReport(report, map, jrds);

new JasperPrintManager().printReport(print, true);



catch (JRException ex) {






Can help me?







By: jorge - sirion_oef

RE: Help Subreport

2005-11-11 15:33

what line throws the exeption?


this line:



try this:

JasperReport report; //out of the try

report = JasperCompileManager.compileReport(xmlFileName);

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