Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LiveReport - input parameter as a comma separated string list issue.

Status
Not open for further replies.

nikkihu

Programmer
May 9, 2015
4
CA
Hi,

I have a LiveReport which receives an input parameter as a list of comma separated strings. This parameter is then used in the where clause [ie. ... WHERE X in (%1)]. the parameter is defined as a String type. When running the LiveReport by supplying value of the parameter like string1, string2,string3, it always returns no result. If I only supply one of the string such as string1, it returns the expected result. I also tried different style of the string format such as 'string1', 'string2, 'string3', still no luck.

However, the correct results returns when i tested it in SQL Developer. I can't pass the values in different parameters since the paremeter contains a dynamic list of strings.

through further testing, I see where the problem is. The comma separated string is prcoessed as a single quoted string, and that explains why the result returns correctly when just supply one string, so the example list is processed as 'string1, string2, string3' instead of 'string1', 'string2', 'string3'. How can i get it returned as a comma separated list? Content Server always insert a quote when you add a single quote in part of the string list. so string1', 'string2', 'string3 will be processed as 'string1'', ''string2'', ''string3'

How to get rid of the auto inserted single quote?

Any help would be greatly appreciated!

Nikki
 
resolved by using regexp_substr. thanks anyway!
 
sounds dangerous passing strings in a input parameter you may want to google for "SQL Injection".A product called Web Reports(actually live Report Extensions ) allows you to properly format "bind params" to the underlying query.But if it works for you and your org is fine then so shall be it :)


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
thanks for the replay appnair! yes, the parameters actually passing from web report to livereport. the livereport is the source for the web reports.

Nikki
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top