Question

I would like to add textbox and submit button to BIRT report (4.2.2). Once submit button is clicked, value of textbox should be used as new input parameter to the same report and the whole report should be reloaded.

In the report, there are two parameters (_id_model, _operation). _operation should be linked to textbox and _id_model should remain as it is.

Now I have:

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

I do not know, how to pass current value of parameter _id_model into form (instead of manually typed value 169. I know I can get required value using params["_id_model"] in expression builder, but struggling to incorporate it into form.

Was it helpful?

Solution

If this form is inserted within a BIRT text element, you can set the current value of _id_model using VALUE-OF tag:

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

You also have to set the HTML text element as "Dynamic text":

enter image description here

OTHER TIPS

Figured it out, there is special tag in BIRT <value-of>

<form method="POST" action="https://birt/frameset" name="reportForm">
 <input type="hidden" name="__report" value="report_name.rptdesign" />
 Model: <input type="text" name="_id_model" value="<VALUE-OF>params["_id_model"].value</VALUE-OF>" /> 
 New Operation: <input type="text" name="_operation">
 <input type="submit" value="Modify Model" />
</form>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top