<p>Hi,</p>
<p> </p>
<p>My requirement is to send a populated list of default values for all the report parameters.. I tried sending all the values as a comma seperated string and then assigning them to a variable and replacing that entire part of the query text with this variable.. Something like this..</p>
<p> </p>
<p>function getMultipleValues (paramName,paramColumn,queryText){<br>
paramArray = paramName.split(",");<br>
var query = "(";<br>
var completeQuery = "";<br>
if(paramArray.length>0){<br>
query = query +" "+ paramColumn +" in (";<br>
}<br>
for(var i =0;i<paramArray.length;i++){<br>
if(i==0){<br>
query = query +paramArray
; <br>
}else{<br>
query = query + "," + paramArray;<br>
}<br>
}<br>
<br>
if(paramArray.length>0){<br>
query = query + ") or 0 = ?)"; <br>
}<br>
<br>
completeQuery = queryText;<br>
queryText = completeQuery.replace("("+paramColumn+" in (?) or 0 = ?)", query);<br>
<br>
return queryText;<br>
};</p>
<p> </p>
<p>This is in an external js file which i am accessing in the beforeOpen of the dataset .. paramName is the params["xxxx"].value, the paramColumn is the column i use in the where clause Ex: "where xx_id in ()", and queryText is "this.queryText".. I can see the modified queryText in exactly as i wanted it to be.. But i get an "Invalid Column Exception" thrown at me..</p>
<p> </p>
<p>I also tried to pass an array and call the arrays toString() and then split into.. It does not seem to work..</p>
<p>I also passed an array and tried the solution in this post <a data-ipb='nomediaparse' href='http://developer.actuate.com/community/forum/index.php?/files/file/722-using-a-multivalue-parameter-in-a-in-clause/'>http://developer.actuate.com/community/forum/index.php?/files/file/722-using-a-multivalue-parameter-in-a-in-clause/</a>, but i get a class cast error, such as [The type of parameter "xxxxxx" is expected as "string", not "[Ljava.lang.String;".] </p>
<p>Kindly reply at the earliest.. Thanks in advance...</p>
<p> </p>
<p>Channamari</p>