facebook

report parameters in jsf

  1. MyEclipse Archived
  2.  > 
  3. MyEclipse Reports
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #282070 Reply

    USDC-VT
    Member

    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>&nbsp</f:verbatim>
    <t:inputDate value=”#{civCaseList.rptStartDate}”
    popupCalendar=”true” />
    <f:verbatim>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</f:verbatim>
    <h:outputText>Report End Date</h:outputText>
    <f:verbatim>&nbsp</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?

    #282200 Reply

    Riyad Kalla
    Member

    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:

    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?

    #282273 Reply

    USDC-VT
    Member

    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

    #282315 Reply

    Riyad Kalla
    Member

    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?

    #282476 Reply

    USDC-VT
    Member

    Riyad,

    This is a J2EE 1.4 project w/Web and JSF capabilities.

    #282481 Reply

    Riyad Kalla
    Member

    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.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: report parameters in jsf

You must be logged in to post in the forum log in