Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Passing Parm values to Report
nuraniuscc
Hi,
Upon accepting the input parameters, How can I "Move" these values to the
Report Header, Detail and/or Footer.
I have such a requirement to Display these values in the Header. I am sure the same applies to Detail and Footer.
Thanks
Nurani Sivakumar
Find more posts tagged with
Comments
mwilliams
Hi Nurani,
You can use a dynamic text box to access the parameter values. For multi-select parameters, you may have to create a string variable that lists all the values out when you iterate through the parameter values creating your IN clause for your SQL statement in the dataSet script.
nuraniuscc
Hi Mike,
Appreciate your prompt response. Exactly, How do I go about doing this?
Thanks
Nurani Sivakumar
mwilliams
Nurani,<br />
<br />
Here is the link to the IN/LIKE Clause thing I sent to you in another thread and an example that uses it to pass multiple parameter values.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/338-birt-parameters-using-in-clause/#description'>BIRT
Parameters - using IN clause - Designs & Code - BIRT Exchange</a><br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/535-using-in-like-clause-in-birt/#description'>Using
IN/LIKE Clause in BIRT - Tutorials - BIRT Exchange</a><br />
<br />
What you'd have to do is create a variable to keep adding to as you iterate through the parameter values for multiple select parameters, very similar to what they do to keep resetting the queryText in this example only with a variable that you can call later. Then you can put a dynamic text box in your report and call the variable there to display the parameter values. If you have a single select parameter, you can just call the parameter value from the text box. Let me know if I don't explain good enough.
nuraniuscc
Hi Mike,
I have "single values" or the user can choose "ALL"
1) This will be used in the SQL (You said, I can code the Generic SQL and
via the Oncreate Method can use the IN Clause to populate the variable.
2) But, If the same "ALL" is also moved to the Header, I just need to show
as "ALL".
I think I can work with a Single parameter concept. Right?
So, Are you sayiing I can refer to the Parameter Variable like any other variable and move values that way.
Ultimately, I cannot Drag and Drop (Since this is NOT part of the Database)
Where do I code the actual MOVE statement? Learning by "Trial by Fire"...
method which is good sometimes and not so good at another time.
Thanks
Nurani Sivkumar
mwilliams
Nurani,
So, your parameter is one value or all values? There is no multiple select? They can't choose more than one value for a given parameter? What I was saying before was that if you allow them to choose more than one value, you'd have to iterate through the parameter object and pull out the individual values. If you're not allowing multiple select, the problem is much simpler and all you have to do is insert a dynamic text box into your report where you want to display the parameter values and choose the parameters in the expression builder.
nuraniuscc
Hi Mike,
Ok, In my situation, Eventhough I create a LIST of values, they can only select one value. One of the values in the list is "ALL" which means everything.
So, What I have done so far is
1) Create a generic SQL statement (NO WHERE Clause)
2) Added the various parms in the "BeforeOpen" method of the particular
datset.
Now, to "MOVE" the Parameter values to the Header, I "Dragged and Dropped"
the Parameter variable to the report. But NOTHING happens. I think It's because I didn't use a Dynamic Text Box.
I know you didn't suggest this as a solution.
Ok, Let me try what you said and come back.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
To get the parameter in the header, just insert a dynamic text element into the header and you can choose the parameter in the expression builder. This should do it for you.