Home Analytics Designing reports
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Enabling or disabling a Report Parameter dynamically

Hi,


 


Although I am comparatively new to BIRT I have created few reports in BIRT. Right now I am facing a problem of how to enable or disable  a report parameter dynamically. I would highly appreciate some help in achieving this functionality in BIRT Designer. I am using BIRT Designer 2.5.2.


 


The functionality I am looking for is as below:


 


1. The user would have to select an option from a dropdown. Each option in the dropdown has a SQL query associated with it with each one of them needing additional input parameter(s).


 


2. What I want to do is depending on what is selected in the dropdown mentioned in Step 1, I want to show additional parameters. For example, if the query needs "number of days" I would like to show the user a textbox and have them enter a number. Or if the SQL query needs a "start" and an "end" date I would like to show two textboxes to enter the "start" and "end" dates.


 


I have figured out how to change the query dynamically in beforeOpen of the DataSet. It's a basically a bunch of if-else statements. I also have figured out how to build the result table at runtime as each query will have different output. I am doing this in beforeFactory of the report.


 


I have successfully done it for the queries that do not need additional input parameter(s) but not sure how  or whether it is possible if I need to provide additional parameters for query at runtime.


 


Any help will be highly appreciated. Thank you.


Tagged:

Comments

  • 185 views and not one suggestion or pointers on how I can implement this functionality!  :(


     


    Guys, I would highly appreciate any help in this.


     


    Thanks!


  • The functionality that you require is not built into the Report Designer, but you can create a custom parameter page as described in the following link which will do what you are asking:


     


    http://blogs.opentext.com/custom-parameter-pages/


     


    The examples provided on the linked page don't dynamically change the input controls based upon the initial user selections, but you can write code to show/hide controls in JavaScript or another language.


     


    Creating multiple reports would also work- opening a different report based upon the initial user selection from a master report.  BIRT provides a Library to reuse the redundant elements that will appear on each report which greatly simplifies the process.  This method would require manual action to create new reports when the first set of options on the report changes.  Some manual intervention would probably be required regardless of what method you use because changing the first set of options also involves changing the interface that the user sees after the initial selection is made.


     


    I hope this is helpful,


    Jeff


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