Carlos Celis Osorio [
http://community.jboss.org/people/cacelis] created the discussion
"Re: How to set BIRT parameters from Seam page?"
To view the discussion, visit:
http://community.jboss.org/message/644187#644187
--------------------------------------------------------------
Hi.
I have other problem when I try to send the parameters from JSF page to a BIRT report.
The problem is, the parameter values aren't arriving to the report.
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, <b:param
name="OficinaVentas" value="OFICINA1" />), the parameters arrive to
the report.
Code is here:
<!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="panel_config_report">
<f:facet name="header">
<h:outputText value="Reporte - Ventas y Devoluciones"
/>
</f:facet>
<table align="center">
<tr>
<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}">
</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}">
</rich:calendar></td>
<td><h:outputText value="Organización de
Ventas" /></td>
<td><h:selectManyListbox id="organizacion"
value="#{report.report.organizacionVentas}"
size="5">
<s:selectItems
value="#{listaOrganizaciones}"
var="_organizacion"
itemValue="#{_organizacion.idOrganizacionVentas}"
label="#{_organizacion.organizacionVentas}"
size="10">
</s:selectItems>
</h:selectManyListbox></td>
<td><h:outputText value="Oficina de Ventas"
/></td>
<td><h:selectManyListbox id="oficina"
value="#{report.report.oficinaVentas}"
size="5">
<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="5">
<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="5">
<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="report1"
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="frameset"
format="html">
<b:param name="OrganizacionVentas"
value="#{report.report.organizacionVentas != null
? report.report.organizacionVentaString : ''}" />
<b:param name="OficinaVentas"
value="#{report.report.oficinaVentas != null ?
report.report.oficinaVentaString : ''}" />
<b:param name="CanalDistribucion"
value="#{report.report.canalDistribucion != null
? report.report.canalDistribucionString : ''}" />
<b:param name="GrupoVentas"
value="#{report.report.grupoVentas != null ?
report.report.grupoVentaString : ''}" />
<b:param name="ResponsablePago"
value="#{report.report.responsablePago != null ?
report.report.responsablePago : ''}" />
</b:birt></td>
</tr>
<tr align="center">
<td align="center"><h:commandButton
id="ver_detalles"
action="#{report.viewDetails()}" value="Ver
detalles" /> <s:button
view="/export.xhtml" id="exportar"
value="Exportar" /></td>
</tr>
</table>
</rich:panel>
</h:form>
</ui:define>
</ui:composition>
</html>
Hope you can help me.
Thanks, in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/644187#644187]
Start a new discussion in JBoss Tools at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]