I solve my question, by this way;

* add a property customParameters to JasperReportsResult with the respective
seter:
    public void setCustomParameters(String customParameters) {
        this.customParameters = customParameters;
    }

* load the customParameters before to generate the report, just after to
initialize the
   parameters property by the plugin:
                //getting the map of parameters
                Map mapParameters = (Map) stack.findValue(customParameters);
                if (mapParameters != null) {
                        parameters.putAll(mapParameters);
                }

* in the struts2 action, I add a Map property and setting values to
customize the report title
        jasperParams = new HashMap();
        jasperParams.put("titulo02", "Listado General de Usuarios");
        jasperParams.put("titulo03", "Filtrados por Departamento y Role");

* mapping the action in the struts.xml
                <action name="usuariosJasper" class="usuarioAction" 
method="print">
                        <result name="success" type="jasper">
                          /reportes/usuarios.jasper
                          usuarios
                          jasperParams
                          PDF
                        </result>
                </action>



cristales wrote:
> 
> I think than adding a map property to the JasperReportsResult
> may help, but I don't know how to access this map object inside the
> JasperReportsResult on run time.
> 
> Cristales
> 
> 
> cristales wrote:
>> 
>> 
>> How I can include parameters to the report in adition to the datasource,
>> to populate fields in the report header, using the plugin 2.0.6 GA.
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts2-JasperReport-plugin---Parameters-tf3806761.html#a10786510
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to