Jump to content
We've recently updated our Privacy Statement, available here ×

subReportExpression


rbojja

Recommended Posts

Hi,
I am using iReport 2.0.4 and using subreport on this.

I am passing Subreport Expression as "sub.jasper" of java.lang.string.This works fine on iReport tool

But when i am working on my java application i am passing my code as below:

subreport = JasperCompileManager.compileReport("sub.jrxml");
masterreport = JasperCompileManager.compileReport("master1.jrxml");

and passing parameter in hashmap as
parameters.put("sub.jasper", subreport);

it gives exception as :
net.sf.jasperreports.engine.JRException: Could not load object from location : sub.jasper

whats the issue?

see in attachment for my jrxml files









[file name=Desktop.zip size=6107]

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi all

for subReport expression pass parameter as

eg : $P{Report1} of java.lang.string and see that this parameter is declared in master report parameter values.

 

and in the java application mention as

parameters.put(

"Report1" , reportFilepath+ "/ACFSub.jasper"); where reportFilepath is location of .jasper  :)

 

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