Welcome, Guest. Please Login.
05/04/24 at 08:33:19
News:
Home Help Search Login


Pages: 1
Send Topic Print
findv, find help? (Read 1254 times)
ITman
Member
**


Hello!

Posts: 76
Gender: female
findv, find help?
11/20/03 at 12:55:50
 
I'm new to TAS and I'm a little confused on how this command works.  take for example....
 
FINDV M FNUM file_hndl KEY data.key.val FOR (data.1.val=data.2.val)
 
I understand that 'data.key.val' in the above has to be a key in the file you are searching.  Does that mean that data.1.val has to be a segment though?  Also, when I search by a particular key, say data.key.val, will it just read the values that equal what they key is?  Or do I have to use something like....
 
FINDV M FNUM file_hndl KEY data.key.val VAL 'jose'
 
to find the first record that has the field data.key.val equal to 'jose'?
 
Confused a little....
ITMan
Back to top
 
 
  IP Logged
ITman
Member
**


Hello!

Posts: 76
Gender: female
Re: findv, find help?
Reply #1 - 11/21/03 at 09:38:22
 
As a side note, I have another question for any  TAS guru....  how come if I have this code to print out UPC codes the description will not print:
 
//Begin Code
  upc_print.click:
    setup_report_buff RB_NUM 1 REPORTNAME 'upc'
    scan @upc_inv key bkic.prod.code disp
      if ( bkic.prod.isupc <> '' ) then output_report_data RB_NUM 1
//  bkic.prod.desc=bkic.prod.desc
    ends
    print_report
    ret
//End Code
 
However if I remove the '//' from the line after the if statement to just allow bkic.prod.desc to equal itself it will work (the description prints on the report)...  like this...
 
  upc_print.click:
    setup_report_buff RB_NUM 1 REPORTNAME 'upc'
    scan @upc_inv key bkic.prod.code disp
      if ( bkic.prod.isupc <> '' ) then output_report_data RB_NUM 1
      bkic.prod.desc=bkic.prod.desc
    ends
    print_report
    ret
 
the statement is AFTER the data is being sent to the report buffer.  huh?
 
Still confused...
Back to top
 
 
  IP Logged
NovaZyg
Administrator
*****


When all else
fails.. Read the
instructions.

Posts: 789
Gender: male
Re: findv, find help?
Reply #2 - 11/24/03 at 21:33:26
 
if ( bkic.prod.isupc <> '' ) then output_report_data RB_NUM 1  
 
 
Try changing the IF THEN to
IF bkic.prod.isupc <> ''  
   output_report_data RB_NUM 1
ENDIF
 
IF THEN on the same line is buggy not sure why but sometimes it works and others it does not.
 
 
Back to top
 
 

Allen Landry
Evo~ERP

EvoERP and DBA Classic always Beta's of the Latest versions.

WWW   IP Logged
ITman
Member
**


Hello!

Posts: 76
Gender: female
Re: findv, find help?
Reply #3 - 11/25/03 at 06:53:39
 
Same thing.  I tried with  "if ( bkic.prod.isupc <> '' ) do" and just " if ( bkic.prod.isupc <> '' )" but I got the same thing.  For some reason I have to have the bkic.prod.desc=bkic.prod.desc after the output for the report buffer.  Weird huh?  Well I'm not to concered about it because it works fine, just oddly.  
 
Thanks,
ITMan
Back to top
 
 
  IP Logged
ITman
Member
**


Hello!

Posts: 76
Gender: female
Re: findv, find help?
Reply #4 - 12/12/03 at 06:46:36
 
Bingo!  I found the problem if anyone was wondering, and it's something completly simple that I overlooked.  I forgot to include the #Winreport at the top...
 
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print