服务器移动后,我的Jasper Report无法在同一目录中找到子报表 [英] My Jasper Report can no longer find a subreport in the same directory after server move

查看:276
本文介绍了服务器移动后,我的Jasper Report无法在同一目录中找到子报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已将应用程序移至新服务器,因此我们知道可能存在一些环境问题。在我们的旧服务器上,Jasper会自动获取与调用它们的报告位于同一目录中的子报告。

We have moved an application to a new server, so we know that we may have some environment issues. On our old server, Jasper would automatically pick up subreports that were located in the same directory as the report that called them.

现在,我们收到如下消息:

Now, we are getting messages like the following:

net.sf.jasperreports.engine.JRException: Could not load object from location : applicationguide_sub_xml.jasper

我可以传递某种默认路径,以便每个报告会自动在同一目录中查找子报告吗?

Is there some sort of default path I can pass so that each report will automatically look for subreports in the same directory?

推荐答案

我认为您忘记更改主报告中的路径。
您可以在XML选项卡中更改它,其中包含以下表达式:

I think you forgot to change the path inside your main report. You can change it in the XML tab where you have the follow expression:

<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
    <defaultValueExpression><![CDATA["YOURNEWPATHHERE"]]></defaultValueExpression>
</parameter>

这篇关于服务器移动后,我的Jasper Report无法在同一目录中找到子报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆