ISTech Support Forum
http://www.istechforum.com/YaBB.pl
Evo-ERP and DBA Classic >> Source Code and Programming in TAS >> findv, find help?
http://www.istechforum.com/YaBB.pl?num=1069361750

Message started by ITman on 11/20/03 at 12:55:50

Title: findv, find help?
Post by ITman on 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

Title: Re: findv, find help?
Post by ITman on 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...

Title: Re: findv, find help?
Post by NovaZyg on 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.



Title: Re: findv, find help?
Post by ITman on 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

Title: Re: findv, find help?
Post by ITman on 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...


ISTech Support Forum » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.