View Full Version : Passing Comma List Through Textbox Parameter
Hey all,
Is there a way to pass a comma list through a textbox parameter using PRD 3.8.0? I currently have a textbox that return a string value but this only returns the first enterred value...
ex.) Pass 1,2,3,4,5 through textbox
into sql statement Select * from Vendor Where Vendor_id in (${param})
This isn't working, any ideas?
Thanks,
KTM
Taqua
12-02-2011, 04:37 PM
Use a multi-select list or use a post-processing formula that transform the string "1,2,3" into a array (CSVARRAY function). If you give a single string, then we will make sure that we apply all quoting necessary to make sure that your string is set as a single string. We are good at preventing SQL injections that way ;)
Hey thanks Taqua, that worked perfect.
For those interested, I added another hidden parameter with "=CSVARRAY([get_vendor];0)" to the post-processing formula, with "Object" set as the value type and it worked like a charm.
My next question is, when I run the report from the BI server I sometimes get and error message saying "Could not fetch parameters". I think this is due to entering too many values, is there a way to increase the number of values I can put into the report?
FYI, when I test the report from Report Designer it seemingly lets me input an infinite amount of values.
Taqua
12-14-2011, 04:00 PM
There is a limit of roughly 1000 characters for the total length of the generated URL. This is a browser limit, so there is no way around it.
In 3.9 we are using a true POST request where the parameter information is in the body of the request instead of the URL. That will allow you to have a unlimited amount of data in your URL (limit to your bandwidth and patience - technically you *can* go megabytes and gigabytes with that (think file upload)).
uwegeercken
01-26-2012, 04:01 AM
In 3.9 we are using a true POST request where the parameter information is in the body of the request instead of the URL.
that would be a severe problem for us as a enterprise customer. we are using wget today to send the report parameters and create the corresponding output. I assume changing to POST means that we will have to redo our complete scheduling strategy.
would it be possible to construct it that way, that the user can select if GET oder POST is used?
rgds,
uwe
Taqua
01-26-2012, 05:56 AM
Sure, its a servlet-container, so it does not care whether you use a POST or a GET. We will default to POST for the next version, as many of our customers run into the length limit on URLs. But of course you are still free to fire GET requests to the server yourself.