Jump to content
Changes to the Jaspersoft community edition download ×

Defining Jasper File Locations

2004 IR Help

Recommended Posts

By: David - gdavej

Defining Jasper File Locations

2005-01-30 14:11

I'm deploying an application in Tomcat that contains a JasperReport. The report consists of a master report with several subreports. At the moment, I'm defining the location of the subreport jasper files by hard-coding the absolute path. Eg:


<subreport isUsingCache="true">


<subreportExpression class="java.lang.String">

<![CDATA["C:/Program Files/Apache Group/Tomcat-5.0.28/webapps/WDMS/jasper/harnessReport/CoverTitle.jasper"]]>




Is there any way I can get this path dynamically from, say the CATALINA_HOME env variable? Or can I use a relative path?






By: Chuck Deal - cdeal

RE: Defining Jasper File Locations

2005-01-31 09:41

For our project, we always include a parameter called ReportPath. We then use this parameter whenever we need to reference a subreport (all reports are in the same folder)


We define ReportPath in our servlet as:




Where JasperReports is a folder under the application root. This keeps our reports dynamic.





By: C-Box - c-box

RE: Defining Jasper File Locations

2005-01-31 22:48

Just my two cent...


perhaps you could pass your SubReports as "JasperReport" Object.... so you needn't any files and directories...

We do put all needed Parameters and CustomDatasources and also SubReports in a kind of container-object where we reference a certain SubReport like: $P{ReportContainer}.getSubReport("NameOfTheCertainSubReport")


Perhaps this helps you going on?!




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