我想向 BIRT 报告 (4.2.2) 添加文本框和提交按钮。单击提交按钮后,文本框的值应用作同一报告的新输入参数,并且应重新加载整个报告。
在报告中,有两个参数(_id_model, _operation
)。 _operation
应链接到文本框,而 _id_model
应保持原样。
现在我有:
<form method="POST" action="https://birt.net/frameset" name="reportForm">
<input type="hidden" name="__report" value="report_name.rptdesign" />
<input type="hidden" name="_id_model" value="169" />
New Operation: <input type="text" name="_operation">
<input type="submit" value="Modify Model" />
</form>
我不知道如何将参数_id_model
的当前值传递到表单中(而不是手动输入值169。我知道我可以使用params["_id_model"]获取所需的值
在表达式生成器中,但很难将其合并到表单中。
最佳答案
如果此表单插入到 BIRT 文本元素中,您可以使用 VALUE-OF 标记设置 _id_model 的当前值:
<form method="POST" action="https://birt.net/frameset" name="reportForm">
<input type="hidden" name="__report" value="report_name.rptdesign" />
<input type="hidden" name="_id_model" value="<VALUE-OF>params["_id_model"]</VALUE-OF>" />
New Operation: <input type="text" name="_operation">
<input type="submit" value="Modify Model" />
</form>
您还必须将 HTML 文本元素设置为“动态文本”:
关于javascript - 将文本框和提交按钮添加到 BIRT 报告中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23221879/