It's all about the answers!

Ask a question

BIRT Report Parameter not working once deployed?


Michael Dundek (41161) | asked Mar 11 '09, 2:46 a.m.
Hello Folks,

I am having problems using Report Parameters to filter the content of my Data Set table within my report. I have a report parameter (combo box) that enables the possibility to filter my Data Set according to a simple String matching criterion (row Equals to  params). The Report Parameter has a default value, and everything works fine the first time I open my report that uses this default value. But when I change that parameter value and press run to recreate the report using a different value than the default value, no data is displayed.
It all works fine within my preview tab in the report designer and in the BIRT report viewer, but when I run the report in Rational Team Concert, and then changing the report parameter will not work anymore.

Does anyone know whats wrong? I use RTC 1.0.1 and installed the BIRT libraries referenced by an official article on the Jazz.net web site.

Thanks

7 answers



permanent link
Rafik Jaouani (5.0k16) | answered Mar 11 '09, 10:12 a.m.
JAZZ DEVELOPER
To allow users to select multiple values for parameters, the parameter value has the following syntax: 'val1','val2','val2'...
If the user passes a single value, the value will be something like 'val' instead of val. So in the filter javascript, you need to remove the quotes from the string and tokenize the values using ',' as a separator.

permanent link
Michael Dundek (41161) | answered Mar 11 '09, 11:42 a.m.
I understand what you are saying, but I do not have multiple parameters in my case, there is only one filter entry for that table (row Equals to  params), and only one name can be selected at a time. Also the parameter entry element is a combo box, so the user is not supposed to manualy type in the filter string, but select one from that combo.
The strange thing is that it works fine in my report design preview window, only once deployed to my RTC project executed through the web interface it doesn't work anymore. It seems like the string used by the parameter is formatted wrong, but that's only a guess of course.

If you have any other suggestions, that would be great!

Thanks

permanent link
Rafik Jaouani (5.0k16) | answered Mar 11 '09, 10:34 p.m.
JAZZ DEVELOPER
Even for single select parameters, you need to trim the value and remove the quotes. Can you please modify you report slightly and make it display the value of the passed in parameter. This is a very useful way to debug issues like this.

Comments
hani zaidi commented Mar 07 '17, 8:15 a.m.

 Hi Rafik,


I understand your proposed solution and you are correct RTC is throwing parameters inside ' ' . Can you please elaborate on your solution?


hani zaidi commented Mar 07 '17, 8:15 a.m.

 trim and replaceAll functions are not working on params[""].value


permanent link
Mohan K M (1111511) | answered Aug 06 '09, 6:14 a.m.
Hi Michael,
Am facing similar issue; Its working perfectly fine with BIRT report preview; once uploaded to server the report parameter selected is not taking effect at all. I was using this parameter as a filter and irrespective what I select in the combo it shows all the records available. Were you able to resolve this? Requesting you to let me know, if am missing something. Many thanks.

Regards,
Mohan.

permanent link
James Moody (3.3k24) | answered Aug 06 '09, 9:53 a.m.
JAZZ DEVELOPER
On 8/6/2009 6:23 AM, mmksri76 wrote:
Hi Michael,
Am facing similar issue; Its working perfectly fine with BIRT
report preview; once uploaded to server the report parameter selected
is not taking effect at all. I was using this parameter as a filter
and irrespective what I select in the combo it shows all the records
available. Were you able to resolve this? Requesting you to let me
know, if am missing something. Many thanks.

Regards,
Mohan.


Hi Mohan,

I've replied to your problem in the other thread.

james

permanent link
Abhinay Agrawal (1) | answered May 21 '14, 2:23 a.m.
 Hi,

I am Geeting some problem in BIRT with report parameters

In my report, I have one parameter. During first time load, the parameters popup page shows and accepts input value, ex: 1000. Based on this input, the report renders and shows result. 

I tried to change the input value by choosing 'run report' button in the report page, which pops up the same parameters page. But after changing value from 1000 to 2000 which is a valid value, the report refreshes but renders with original input value say 1000 but not with new value 2000. 

This behaviour exits for other data types report parameters like integer, date time etc.,

Can you please suggest me how to resolve this.


Regards
Abhinay

permanent link
hani zaidi (74822) | answered Mar 07 '17, 9:12 a.m.

 Use this code in parameter. Here the parameter is iteration and in SQL query I have T1.ITERATION_NAME LIKE ?


if(params["Iteration"].value == '%'){
params["Iteration"].value;
}
else{
var str = params["Iteration"].value;
str = str.toString();
str = str.replace(/["']/g, "");
str;
}

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.