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

A number is required here

$
0
0

Hello,

 

I have a formula here for a sub report that check from my main report for values here.

 

If the value from main report (SDay1) if it's a positive number then I want to put this value in "-" if that number is negative then I want to add in from another variable (WIPMAIN and divided from number in the database)

 

Here is my formula:

 

WhilePrintingRecords;

Shared Numbervar SDay1;

Shared Numbervar WDay1;

Shared Numbervar WIPMAIN;

Shared Numbervar WTemp1;

Shared Stringvar STemp;

 

If (Sday1 > 0)  Then   

     (   

     WTemp1 := (WIPMAIN / {V_STRUC_HDR_COMP_ISS_DATA.COMP_PART_QTY_PER_ASSEMBLY})+ Sday1;  //Place holder need for other   calculations    

     WDay1 := 0   

     )

 

Else   

     (    

     If (WIPMAIN =0) Then       

          WDAY1 := 0   

     Else       

          WDay1 := (WIPMAIN / {V_STRUC_HDR_COMP_ISS_DATA.COMP_PART_QTY_PER_ASSEMBLY})+ Sday1

     );

 

 

I tried this on the first if statment

 

If (Sday1 > 0) then

     (

     WTemp1 : = the same as above .....

     WDay1 := totext("-")

 

it gives me an error saying it requires a number here.

 

I tried to replace totext to CSTR, same error.

 

If anyone can help I would appreciated it.

 

Regards,
Gerald


Viewing all articles
Browse latest Browse all 3208


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