List Info

Thread: Created: (WW-1946) JasperReports-Plugin custom parameteres




Created: (WW-1946) JasperReports-Plugin custom parameteres
country flaguser name
United States
2007-05-25 13:59:42
JasperReports-Plugin custom parameteres
---------------------------------------

                 Key: WW-1946
                 URL: https
://issues.apache.org/struts/browse/WW-1946
             Project: Struts 2
          Issue Type: Improvement
          Components: Plugins
    Affects Versions: 2.0.6
            Reporter: Carlos Cristales


I need to pass custom params to the JasperReport-Plugin, to
customize the title report by example,
and I solve my need 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">
                                <param
name="location">/reportes/usuarios.jasper</p
aram>
                                <param
name="dataSource">usuarios</param>
		         	  <param
name="customParameters">jasperParams</param&
gt;
	         		  <param
name="format">PDF</param>
                        </result>
                </action> 

P.D
I'am very newbie in this, and I'am not sure if this the
correct way to report this,
in adition my englhis is very bad, bot I hope this post may
to help to someone.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Assigned: (WW-1946) JasperReports-Plugin custom parameteres
country flaguser name
United States
2007-07-16 11:41:12
     [ https://issues.apache.org/struts/browse/WW-1946?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Holmes reassigned WW-1946:
--------------------------------

    Assignee: James Holmes  (was: Rainer Hermanns)

> JasperReports-Plugin custom parameteres
> ---------------------------------------
>
>                 Key: WW-1946
>                 URL: https
://issues.apache.org/struts/browse/WW-1946
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugins
>    Affects Versions: 2.0.6
>            Reporter: Carlos Cristales
>            Assignee: James Holmes
>             Fix For: 2.1.0
>
>
> I need to pass custom params to the
JasperReport-Plugin, to customize the title report by
example,
> and I solve my need 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">
>                                 <param
name="location">/reportes/usuarios.jasper</p
aram>
>                                 <param
name="dataSource">usuarios</param>
> 		         	  <param
name="customParameters">jasperParams</param&
gt;
> 	         		  <param
name="format">PDF</param>
>                         </result>
>                 </action> 
> P.D
> I'am very newbie in this, and I'am not sure if this the
correct way to report this,
> in adition my englhis is very bad, bot I hope this post
may to help to someone.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


Closed: (WW-1946) JasperReports-Plugin custom parameteres
country flaguser name
United States
2007-11-04 18:16:34
     [ https://issues.apache.org/struts/browse/WW-1946?page=com.at
lassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tom Schneider closed WW-1946.
-----------------------------

    Resolution: Won't Fix
      Assignee: Tom Schneider

Poking around in the documentation, I found that this was
already documented here: http://struts.apache.org/2.x/docs/jasperreports-tut
orial.html  So I'm resolving this as won't fix because
needed functionality is already available.

> JasperReports-Plugin custom parameteres
> ---------------------------------------
>
>                 Key: WW-1946
>                 URL: https
://issues.apache.org/struts/browse/WW-1946
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JasperReports
>    Affects Versions: 2.0.6
>            Reporter: Carlos Cristales
>            Assignee: Tom Schneider
>             Fix For: 2.1.1
>
>
> I need to pass custom params to the
JasperReport-Plugin, to customize the title report by
example,
> and I solve my need 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">
>                                 <param
name="location">/reportes/usuarios.jasper</p
aram>
>                                 <param
name="dataSource">usuarios</param>
> 		         	  <param
name="customParameters">jasperParams</param&
gt;
> 	         		  <param
name="format">PDF</param>
>                         </result>
>                 </action> 
> P.D
> I'am very newbie in this, and I'am not sure if this the
correct way to report this,
> in adition my englhis is very bad, bot I hope this post
may to help to someone.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )