324 |
324 |
String subReportDir = (String) parameters.get("SUBREPORT_DIR");
|
325 |
325 |
if (subReportDir == null || subReportDir.equals(""))
|
326 |
326 |
{
|
327 |
|
// if the subreport directory is not set
|
328 |
|
parameters.put("SUBREPORT_DIR", jasperDirectory);
|
|
327 |
// if the subreport directory is not set
|
|
328 |
subReportDir = jasperDirectory;
|
329 |
329 |
}
|
330 |
330 |
else
|
331 |
331 |
{
|
332 |
332 |
// if the path is relative
|
333 |
333 |
if (!(new File(subReportDir)).isAbsolute())
|
334 |
334 |
{
|
335 |
|
subReportDir = (jasperDirectory != null && jasperDirectory.trim().length() > 0 ? (jasperDirectory.endsWith("/") ? "" : "/") + subReportDir : subReportDir);
|
336 |
|
subReportDir = adjustFileUnix(subReportDir);
|
337 |
|
parameters.put("SUBREPORT_DIR", subReportDir);
|
|
335 |
subReportDir = adjustFileUnix(jasperDirectory + subReportDir);
|
338 |
336 |
}
|
339 |
337 |
else
|
340 |
338 |
{
|
341 |
339 |
//SUBREPORT_DIR value is an absolute path - this is not allowed
|
342 |
|
Debug.warn("SUBREPORT_DIR cannot be specified as an absolute location; please use a location relative to the reports directory");
|
|
340 |
throw new JRException("SUBREPORT_DIR cannot be specified as an absolute location; please use a location relative to the reports directory");
|
343 |
341 |
}
|
344 |
342 |
}
|
|
343 |
parameters.put("SUBREPORT_DIR", subReportDir);
|
345 |
344 |
|
346 |
345 |
Debug.trace("JasperTrace: Extra Directories: " + extraDirs);
|
347 |
346 |
ArrayList<String> al = JasperReportsUtil.StringToArrayList(extraDirs);
|
... | ... | |
470 |
469 |
}
|
471 |
470 |
catch (Exception e)
|
472 |
471 |
{
|
473 |
|
Debug.log("Cause: " + e.getCause() +"\nMessage: " + e.getMessage());
|
474 |
|
throw new JRException("Cause: " + e.getCause() +"\nMessage: " + e.getMessage());
|
|
472 |
Debug.log("Cause: " + e.getCause() +"\nMessage: " + e.getMessage(), e);
|
|
473 |
throw new JRException("Cause: " + e.getCause() +"\nMessage: " + e.getMessage(), e);
|
475 |
474 |
}
|
476 |
475 |
|
477 |
476 |
if (virtualizer != null)
|