In SAP Crystal Reports XI, return records that match multiple conditions

SAP HANASAPSAP Basis

<p style="">It is advisable to use functions to pass such filter conditions in CR. Also try changing the order of your condition like &minus;</p><pre class="result notranslate">({PR.cov} = &quot;A&quot; and {PR.cov}=&quot;B&quot;) or {PR.cov} = &quot;A&quot; Try using function like this: {@A}:if {PR.cov} = &quot;A&quot; then 1 else 0</pre><p style="">To create custom functions in Crystal Report, navigate to Report Menu &rarr; Formula Expert &rarr; Right Click on Custom Functions &rarr; New</p><p><img src="/assets/questions/images/101733-1513052894.png" class="fr-fic fr-dii" width="605" height="328"></p><p style="">It is advisable to use custom functions when you have multiple parameters to pass in the condition. You can also use the following when you have two string parameters &minus;</p><pre class="prettyprint notranslate">( &#39;A&#39; IN {?cov} OR {PR.cov} IN {?cov ) AND ( &#39;B&#39; IN {?cov} OR {PR.cov} IN {?cov )</pre>
raja
Updated on 13-Feb-2020 10:22:43

Advertisements