Home
Designing Analytics Reports
Multiple optional parameter.
Migrateduser
<p>Good morning!</p>
<p> </p>
<p>I have a report with multiple parameter and I am using</p>
<pre class="_prettyXprint">
AND (HR_APPOINTMENT.C_DEPARTMENT IN (****) OR HR_APPOINTMENT.C_SUBMISSION1 IN (****)
OR HR_APPOINTMENT.C_SUBMISSION2 IN (****))</pre>
<p>in my DataSet and</p>
<pre class="_prettyXprint">
this.queryText = this.queryText.replace("****", params["STR_C_DEPART"]);</pre>
<p>in the BeforeOpen script.</p>
<p> </p>
<p>I need this parameter to be optional at the same time. How can I script it??? Usually I am using something like </p>
<pre class="_prettyXprint">
var where="";
if ( params["DATE_BEGIN"].value != null) {
if (where=="") {
where = "DOC.DOC_DATE >= '" + params["DATE_BEGIN"].value + "'";
}
else {where = where + " AND DOC.DOC_DATE >= '" + params["DATE_BEGIN"].value + "'"}
}</pre>
<p>with "1=1" in the DataSet.</p>
<p>But I am not sure how can I integrate multiple “xxx†in this condition?</p>
Find more posts tagged with
Comments
There are no comments yet