Passing Multiple value to report parameter
Hi All, i have oracle database as a backend and i have query....... QUERY :::: select name from table Result ::: NAME A B C D But i want data in this format NAME A,B,C,D So i have changed the query to as below ::: select substr(sys_connect_by_path(name, ','),2) from (select name, row_number() over (order by name) rn, count(*) over () cnt from (select name from table)) start with rn=1 connect by rn=prior rn +1 order by rownum desc) where rownum =1 Result Name A,B,C,D Seems i got desired result, but when i passed this string to the report parameter, it will not generate any data, but data is there in the data base for these names. kindly suggest , whether it is a formatting issue or i am missing something around. Amit )
April 21st, 2011 8:57am

do you want to pass all (A,B,C,D) together to get the data or the data is available for separate values and you want to use as a multivalue parameter. Try this: Go to your main dataset properties --> parameters --> where you have a parameter (Name) --> change the parameter value and use this expression =Join(Parameters!Name.Value,",") -Hardik Please remember to mark the replies as answers if they help..
Free Windows Admin Tool Kit Click here and download it now
April 21st, 2011 1:40pm

Hi Hardik, I have used the join in Parameter, and when i look into the parameter dropdown it will show all the values as desired but when i tried to view the report, it will not show data for the name. Kindly suggest how could i pass all the values at one go amit
April 28th, 2011 9:34am

If I have the right idea about what you are wanting to do, I know what the problem is, but I don't know how to get around it in Oracle. I think that you want to be able to pass A,B,C,D like a multivalued parameter. Kind of like this... SELECT FieldList FROM TableName WHERE LetterField IN (A,B,C,D) The problem is that the concatenated string is being passed as exactly that... a concatenated string. So you're basically getting this... SELECT FieldList FROM TableName WHERE LetterField IN ('A,B,C,D') Since you don't have any values names 'A,B,C,D' you aren't getting any results The key is to split the CSV into rows using a table variable (or Oracles equivalent), so that you can use something like this... SELECT FieldList FROM TableName WHERE LetterField IN (SELECT Value FROM @TableVariable) Jason Long
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 4:47pm

Check out this thread. It deals with the same issue, but the back end is a SQL Server SP, not Oracle. If you can adapt the solution to Oracle you should be in good shape. SQL Query for user submitted valuesJason Long
April 28th, 2011 4:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics