Jump to content

Specify subreport in same directory as master


israel_2

Recommended Posts

I have a subreport .jrxml file sitting in the same directory as my master. I have my subreport expression set to 

net.sf.jasperreports.engine.JasperCompileManager.compileReport("subreport1.jrxml")[/code]

but that gives an "java.io.FileNotFoundException" error. Same if I try "./subreport1.jrxml". the only thing that seems to work is to provide the full path, which of course is not an option (since it is not portable). In searching for a solution, I found a lot of references to the parameter $P{SUBREPORT_DIR}, but I don't have that parameter available. How can I specify that the subreport is in the same directory as the master report?

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