I need to generate reports based merchant parameter value. If it is null/empty then report should return all the documents, otherwise the specific document that matches should be returned. Tried different things and none of them worked. Appreciated any ideas/suggestions. Thanks Code:<parameter name="state" class="java.lang.String"/><parameter name="merchant" class="java.lang.String"/><queryString language="MongoDbQuery"> <![CDATA[{'collectionName':'Merchant' , 'findQuery' : {'$and' : [ {'_id.state' : '$P!{state}'} , {'_id.merchantId : '$P!{merchant}'} ] } }]]></queryString>