Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem passing parameters to BIRT reports from JSF pages with Seam
cacelis
Hi.<br />
<br />
I have a problem when I try to send the parameters from JSF page to a BIRT report.<br />
The problem is, the parameter values aren't arriving to the report.<br />
If I print the values selected in the list, I can see them in the display but, they don't arrive to the report. Otherwise, If I try to send constant values in the attribute "value" of the tag "b:param" (for example, <pre class='_prettyXprint _lang-auto _linenums:0'><b:param name="OficinaVentas" value="OFICINA1" /></pre>), the parameters arrive to the report.<br />
<br />
Code is here:<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:birt="http://www.eclipse.org/birt/taglibs/birt.tld"
xmlns:b="http://jboss.com/products/seam/birt">
<ui:composition template="/layout/template.xhtml">
<ui:define name="body">
<h:form id="homeForm">
<rich:panel id="panelConfigReporte">
<f:facet name="header">
<h:outputText value="Reporte - Ventas y Devoluciones" />
</f:facet>
<table align="center">
<tr align="right">
<td><h:outputText value="Fecha Inicio:" /></td>
<td><rich:calendar id="fecha_inicio" datePattern="dd/MM/yyyy"
popup="true" locale="CO" enableManualInput="false"
value="#{report.report.fechaInicio}" inputSize="10">
</rich:calendar></td>
<td><h:outputText value="Fecha Fin:" /></td>
<td><rich:calendar id="fecha_fin" datePattern="dd/MM/yyyy"
popup="true" locale="CO" enableManualInput="true"
value="#{report.report.fechaFin}" inputSize="10">
</rich:calendar></td>
<td><h:outputText value="Organizaci?n de Ventas" /></td>
<td><h:selectManyListbox id="organizacion"
value="#{report.report.organizacionVentas}" size="10">
<f:selectItem itemLabel="---TODOS---" itemValue="0" />
<s:selectItems value="#{listaOrganizaciones}"
var="_organizacion"
itemValue="#{_organizacion.idOrganizacionVentas}"
label="#{_organizacion.organizacionVentas}">
</s:selectItems>
</h:selectManyListbox></td>
<td><h:outputText value="Oficina de Ventas" /></td>
<td><h:selectManyListbox id="oficina"
value="#{report.report.oficinaVentas}" size="10">
<f:selectItem itemLabel="---TODOS---" itemValue="0" />
<s:selectItems value="#{listaOficinaVentas}" var="_oficina"
itemValue="#{_oficina.idOficinaVentas}"
label="#{_oficina.oficinaVentas}">
</s:selectItems>
</h:selectManyListbox></td>
<td><h:outputText value="Canal de Distribuci?n" /></td>
<td><h:selectManyListbox id="canal"
value="#{report.report.canalDistribucion}" size="10">
<f:selectItem itemLabel="---TODOS---" itemValue="0" />
<s:selectItems value="#{listaCanalDistribucion}" var="_canal"
itemValue="#{_canal.idCanalDistribucion}"
label="#{_canal.canalDistribucion}">
</s:selectItems>
</h:selectManyListbox></td>
<td><h:outputText value="Grupo de Ventas" /></td>
<td><h:selectManyListbox id="grupo"
value="#{report.report.grupoVentas}" size="10">
<f:selectItem itemLabel="---TODOS---" itemValue="0" />
<s:selectItems value="#{listaGrupoVentas}" var="_grupo"
itemValue="#{_grupo.idGrupoVendedor}"
label="#{_grupo.grupoVendedor}">
</s:selectItems>
</h:selectManyListbox></td>
<td><h:outputText value="Responsable de Pago" /></td>
<td><h:inputText value="#{report.report.responsablePago}" />
</td>
</tr>
<tr>
<td colspan="14" align="center"><h:commandButton id="generar"
action="#{report.generateReport()}" value="Visualizar reporte" />
</td>
</tr>
</table>
</rich:panel>
<rich:panel id="panelReporte"
rendered="#{report.report.fechaFin != null and report.report.fechaInicio != null
and report.report.organizacionVentas != null and report.report.oficinaVentas != null
and report.report.canalDistribucion != null and report.report.grupoVentas != null
and report.report.responsablePago != null}">
<f:facet name="header">
<h:outputText value="Reporte consolidado" />
</f:facet>
<table align="center">
<tr align="center">
<td align="center">
<b:birt designName="/report/design/reporteVentasDevolucionesConsolidado.rptdesign"
designType="embed" format="html" embeddable="true">
<b:param name="OrganizacionVentas"
value="#{report.report.organizacionVentaString}" />
<b:param name="OficinaVentas"
value="#{report.report.oficinaVentaString}" />
<b:param name="CanalDistribucion"
value="#{report.report.canalDistribucionString}" />
<b:param name="GrupoVentas"
value="#{report.report.grupoVentaString}" />
<b:param name="ResponsablePago"
value="0091014819 " />
</b:birt>
<h:outputText value="#{report.report.organizacionVentaString}" /><br />
<h:outputText value="#{report.report.oficinaVentaString}" /><br />
<h:outputText value="#{report.report.canalDistribucionString}" /><br />
<h:outputText value="#{report.report.grupoVentaString}" /><br />
<h:outputText value="#{report.report.responsablePago}" />
</td>
</tr>
<tr align="center">
<td align="center">
<h:commandButton id="ver_detalles"
action="#{report.viewDetails()}" value="Ver detalles" />
</td>
</tr>
</table>
</rich:panel>
</h:form>
</ui:define>
</ui:composition>
</html>
</pre>
<br />
<br />
Working in Windows 7 with:<br />
<br />
--> JBoss Developer Studio 5.0.0.M4<br />
--> JBoss AS 6.0.0 Final<br />
--> Seam 2.2.1 Final<br />
--> BIRT 3.7.0<br />
<br />
<br />
Hope you can help me.<br />
Thanks, in advance.
Find more posts tagged with
Comments
There are no comments yet