list box parameter in report not working

Hello,
I'm beginner at Birt.
I found an example to create a report where we can display parameter in a list box.
The problem is that when I select the one choice in the select list, the report doesn't work (it always display all the data).
In attached the rptdesign.
Can anyone help me to find a solution ?

Thanks,

Comments

  • Here is a modified version of your report. I removed the code and used the following steps to add the "ALL" option to the list:

    1. Change the ParameterDS query. Add the "ALL" value.
    2. Change the parameter to List Box and make it visible.
    3. Modify the Data Set filter to handle the "ALL" selection.

    Please test thoroughly before using in production.

    Jeff F.
    Customer Support Engineer I
    OpenText
  • Hi Jeff,

    Thanks for your time to answer to my request and for the changes on the report which is works very well.
    What I really need is that list of the parameter is displayed on the report, in a select list, as you can see in the screenshot.
    Do you know if is it possible ? If yes, can you help me to do that please ?

    Thanks a lot,

  • Thanks for the clarification. If I understand correctly now, the existing parameter interface implements the same functionality that you are trying to implement. It requires three mouse clicks instead of two, but it works without any code. You probably already know this, but you said you are new to the product so I wanted to mention it.

    I tested your report in Chrome, Firefox, and IE. The report and the custom dropdown listbox you created work perfectly for me in Chrome and Firefox. The dropdown does not work in IE. You said that when you select a country in the list, the report shows all of the data, not just the data for the selected country. When I tested in Chrome and Firefox, the data was filtered correctly. Does it work for you in Chrome and Firefox? Do you need to use a different browser? If so, which browser are you using and does that browser support your code?

    I have a question about your code. How does the report get reloaded? It looks like the following line just saves the modified URL:

    window.location.search = query.toString()

    Does it also automatically load the URL? I was expecting to see a load() or reload() call.

    Thanks.

    Jeff F.
    Customer Support Engineer I
    OpenText
Sign In or Register to comment.