Jump to content

Recommended Posts

Posted

Hi @all,

searching this forum, I found no hint to solve my problem:

I have a report (iReport 3.7.4, Win7-64) in this directory: C:\Users\Public\DocMgr\JRXML\Personen\Listen_Personen\

Subreports should be placed in: C:\Users\Public\DocMgr\JRXML\subreports

As I don't know the directory structure of the target pc, I've to address the subreport relatively. This should be solved via the parameter "SUBREPORT_DIR". This works fine if I fill it with the absolute path (C:\\Users\\Public\\DocMgr\\JRXML\\subreports\\) - but not with the relative one (..\\..\\subreports\\). I suppose, that my syntax for relative adressing is wrong... the error message is: java.lang.Exception: ..\..\subreports\mysubreport.jrmxl not found

Can anybody help?

toxy

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Posted

this have been one of my multiple tries...

--> java.lang.Exception: ../../subreports/briefkopf_hoch.jrxml not found

thanks

Posted

Hi,

looks like you are calling the .jrxml file in the expression. You need to call the compiled .jasper file. (../../subreports/reportName.jasper).

 

Hope this can help you.

Posted

hm, the "Subreport Expression" is  $P{SUBREPORT_DIR}+"briefkopf_hoch.jasper". In the subdirectoy there are both files. Somwhere there is the setting "compile supreports" or similar... so iReports tries to compile it --> jrxml  (if I understand it correctly).

thanks

toxy

Posted

Hi,

The jrxml file is just the file used for development. The JaspersReport engine uses the compiled file (.jasper) for processing the report. iReport automatically compile the jrxml file before executing the jasper file itself.

 

I guess the $P{SUBREPORT_DIR} parameter defaults to the same directory as the master report like this "". If you haven't done yet maybe you need to set this parameter to "../../subreports" first.

 

Personally I just use the relative path directly as the suberport expression, reffering to the relative location of the .jasper file.

Posted

anode36
Wrote:

Personally I just use the relative path directly as the suberport expression, reffering to the relative location of the .jasper file.

This is interesting... how do you write this exactly? In my case I would write: ""..//..//subreports//briefkopf_hoch.jasper" wich is interpreted by the compiler as "../../subreports/briefkopf_hoch.jasper". This expression is correct in all my knowledge of 20 years in IT... but doesn't work! :-(

greetings

toxy

( backslashes printed as slashes!)



Post Edited by toxy at 09/15/2010 06:46
  • 5 months later...
Posted

 I''ve got the same problem.

I want to reference a subreport in a previous folder like this:

../mysubreport.jasper

 

Every time ireport couldn't find that one.

Any suggestion?

Thx

Posted

The problem was solved by our db-developer... the calling application overwrites the parameter "SUBREPORT_DIR" with the right value of the actual installation. So I can develop my reports with a fixed subreports-path according to my installation, customer's installation doesn't bother me...

toxy

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