Is there a way to write conditional queryString for jrxml on Jaspersoft?

I wrote this `queryString` but I want to convert it to conditional statement like `defaultValueExpression`

Here's my case;

    <queryString language="MongoDbQuery">
            <![CDATA[{
    'collectionName':'scheduler',
        findQuery : {
          $and : [
            { 'action': { $nin : ['retry', 'retryOnce']},
            'payload.measurement.metricIdentifier' :  'X'
            $P!{whereClauseForGeriOdeme}
            $P!{whereClauseForHAB}
            $P!{whereClauseForStartDate} $P!{whereClauseForEndDate} $P!{whereClauseForArizaId} $P!{whereClauseForServiceNo} $P!{whereClauseForSiebelCustomerId}  $P!{whereClauseForServiceType} $P!{whereClauseForAccessType} $P!{whereClauseForTaahhutSure}}
          ]
        }
    }]]>

As I said, I want to send query statement to Mongodb if the statement is true, otherwise don't send query to db in vain.

Thanks for help!

brkulu.06's picture
Joined: Nov 7 2019 - 11:06pm
Last seen: 2 years 9 months ago

0 Answers:

No answers yet
Feedback