【问题标题】:How to call birt report from jsp page?如何从jsp页面调用birt报告?
【发布时间】:2012-04-27 07:06:13
【问题描述】:

我已经使用 birt 工具生成了 jasper 报告。它在 birt 报告查看器中运行良好。但是现在我想从 jsp 页面运行 birt 报告。所以说任何用户点击提交按钮,应该运行该 birt 报告。

由于我是 jasper 报告的新手,我对此一无所知。请帮助我。

【问题讨论】:

  • I have generated jasper report using birt tool - 怎么可能?

标签: java jsp birt


【解决方案1】:

在您的 web.xml 文件中添加此标记

<jsp-config>
    <taglib>
        <taglib-uri>/birt.tld /taglib-uri>
        <taglib-location>/WEB-INF/tlds/birt.tld /taglib-location>
    </taglib>
</jsp-config>

在你的jsp中使用这个标签库

<%@ taglib uri="/WEB-INF/tlds/birt.tld" prefix="birt"%>

在 jsp 中添加此代码

<birt:viewer id="birtViewer" reportDesign="bank_detail_report.rptdesign" pattern="run" height="600" width="1000" format="pdf" scrolling="yes" showParameterPage="false">
    <birt:param name="param1" value='<%=request.getParameter("txtParam1")%>'></birt:param>
    <birt:param name="param2" value='<%=request.getParameter("txtParam1")%>'></birt:param>
</birt:viewer>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-09
    相关资源
    最近更新 更多