Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8076

formula help please

$
0
0

Hi All,

 

Please help for this formula.

I have a main report having 5 sub reports inside it.I kept all in different report footers.

I am showing them based on some conditions and working fine.

Now I need to show a text "no data" if there is no data available for any of the sub report by and also based on some conditions.

 

My 1st sub report I am showing based on below code.


If NOT({Status.scan_mode} IN ["C","D"] ) then

     (

          If {Status.status} < 3 then

          (

               if {?Stack} = "S" then False

               else True

          )

          else True

     )

     else True

 

Code for showing 2nd sub report :

 

If Not({Status.scan_mode} IN ["C","D"]) then

     (

          If {Status.status} IN  [3,6] then

          (

               if {?Stack} = "P" then False

               else True

          )

          else True

     )

     else True

 

Code for showing 3rd sub report :

If Not({Status.scan_mode} IN ["C","D"]) then

     (

          If {Status.status}=4 then

          (

               if {?Stack} = "A" then False

               else True

          )

          else True

     )

     else True

 

Code for showing 4th sub report :

  If {Status.scan_mode} IN ["C","D"] then

     (

          If {Status.status} < 3 then

          (

               if {?Stack} = "S" then False

               else True

          )

          else True

     )

     else True

 

Code for showing 5th sub report :

If {Status.scan_mode} IN ["C","D"] then

     (

          If {Status.status} = 4 then

          (

               if {?Stack} = "A" then False

               else True

          )

          else True

     )

     else True

 

In all sub reports I created record number formula and passing shared vars like this.

 

@Recordnum:


whilereadingrecords;

numbervar x := x + 1;

"";

 

@Shared Var :


shared numbervar s1;

numbervar x;

s1 := x;

"";

 

I wrote formula @NoData like this but not getting the result

Please correct me If I am doing wrong in my formula

 

shared numbervar s1;

shared numbervar s2;

shared numbervar s3;

shared numbervar s4;

shared numbervar s5;

if isnull({Status.scan_mode}) or isnull({Status.status}) or

(s1 = 0 AND {Status.scan_mode} = "I" and {Status.status} < 3 and ({?Stack} <> 'S') ) or

(s2 = 0 AND {Status.scan_mode} = "I" and ({Status.status} in [3,6]) and ({?Stack} <> 'P')) or

(s3 = 0 AND {Status.scan_mode} = "I" and {Status.status}= 4 and ({?Stack} <> 'A') ) or

(s4 = 0 AND {Status.scan_mode} in ['C','D'] and {Status.status} < 3 and ({?Stack} <> 'S')) or

(s5 = 0 AND {Status.scan_mode} in ['C','D'] and {Status.status}= 4 and ({?Stack} <> 'A'))

then 'noData'


Viewing all articles
Browse latest Browse all 8076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>