| Author |
Message |
|
|
Post subject: report parameters in jsf
Posted: Feb 22, 2008 - 03:45 PM
|
|

Joined: Dec 15, 2005
Posts: 37
|
|
I have been attempting to obtain report parameters in a jsf application for use in a report via the birt:param tag.
<h:form>
<h:outputText>Report Start Date</h:outputText>
<f:verbatim> </f:verbatim>
<t:inputDate value="#{civCaseList.rptStartDate}"
popupCalendar="true" />
<f:verbatim>        </f:verbatim>
<h:outputText>Report End Date</h:outputText>
<f:verbatim> </f:verbatim>
<t:inputDate value="#{civCaseList.rptEndDate}"
popupCalendar="true" />
:
:
:
<birt:viewer id="birtViewer"
reportDesign="reports/civil_case.rptdesign"
height="600"
width="800"
frameborder="yes"
pattern="frameset"
format="HTML"
isHostPage = "false">
<birt:param name="StartDate"
value="#{civCaseList.rptStartDate}"/>
<birt:param name="EndDate"
value="#{civCaseList.rptEndDate}"/>
</birt:viewer>
However, when the report is rendered, the literal text for the param values is used rather than the input value from the backing bean as I would expect.
(i.e. "#{civCaseList.rptStartDate}" rather than "01/01/2008")
Of course, if I remove the param tags, the report parameter page is displayed and the report retrieves its values from there correctly.
What am I missing? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: report parameters in jsf
Posted: Feb 27, 2008 - 04:44 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Howard,
You want to check the TLD for Birt and make sure it allows expressions for the value arguments. If it doesn't, those will be interpreted literally.
Also I wasn't clear on this sentence:
| Quote: |
Of course, if I remove the param tags, the report parameter page is displayed and the report retrieves its values from there correctly.
|
It sounds like if you remove your param tags, the report displays and *magically* gets the correct rptStartDate and rptEndDate values from some where... that just seemed strange, I guess I misunderstood though? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: report parameters in jsf
Posted: Feb 28, 2008 - 08:20 PM
|
|

Joined: Dec 15, 2005
Posts: 37
|
|
Riyad,
Yeah, does sound a little strange...
What I meant was that if I removed the birt:param tags, the birt page which collects the required parameters is displayed and I can enter the parameters there. While that does work, I had hoped to use a tomahawk inputDate tag with a popup calendar instead of requiring users to key in the desired dates.
Haven't looked, but suspect the Birt TLD does not allow expressions as you suggest.
I'm thinking a custom birt parameter page is the way to go...
Thanks,
Howard |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: report parameters in jsf
Posted: Feb 29, 2008 - 08:11 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Howard,
I just checked the TLD and it does allow an expression for the param... so my next thought is that some setting for that web context is causing that not to be interpreted as an expression.
Is that a Java EE 5 web project or J2EE 1.4? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: report parameters in jsf
Posted: Mar 05, 2008 - 02:51 PM
|
|

Joined: Dec 15, 2005
Posts: 37
|
|
Riyad,
This is a J2EE 1.4 project w/Web and JSF capabilities. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: report parameters in jsf
Posted: Mar 05, 2008 - 04:06 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
That could be it... I know some app servers have different default behaviors for processing EL when it's a J2EE 1.4 project, because there was not a common EL spec for that release, but in 5 there was.
Double-check your server docs to see if you can find the settings for forcing EL-expression processing, it should be as easy as flipping that on and then stuff would work. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|