- This topic has 5 replies, 2 voices, and was last updated 16 years, 9 months ago by Riyad Kalla.
-
AuthorPosts
-
USDC-VTMemberI 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?
Riyad KallaMemberHoward,
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:
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?
USDC-VTMemberRiyad,
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
Riyad KallaMemberHoward,
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?
USDC-VTMemberRiyad,
This is a J2EE 1.4 project w/Web and JSF capabilities.
Riyad KallaMemberThat 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.
-
AuthorPosts