custome data

Posted by: Sami786

custome data - 08/30/19 04:08 PM

Hi All, can someone look at my code and help me get this right!

I need to print Total amount when the certificate numbers are 001 and 002 only.

Below code is converted PresTalk code, which works but its printing all the certificate numbers even if it's 003 or 004.

Data example is CSV format

Total amount start from line 208 and goes down on every 6 lines.

$500.00
a
s
d
f
g
$4.00 skip this line
q
w
e
r
t
$300.00
z
x
c
v
b
$120.00

Certificate numbers start from line 568 to line 579.
001
009
002
001


result should be printed like below
$500.00
$300.00
$120.00

so $4.00 should not be printed because certificate number is 009

I don't know how to skip certificate number other then 001 and 002!

&width := 0.0
&height := 0.0
margin(0,0.3281)
set(&current.line,&current.line)
if(trimright(trimleft(@(&current.line,1,256))) <> '')
if(mod(&current.line-208,6)=0)
if(stringwidth(trimright(trimleft(@(&current.line,1,20)))) > &Width)
&Width := stringwidth(trimright(trimleft(@(&current.line,1,20))))
endif()

% need a counter here
% need to loop here and check for each value here

showcenter(trimright(trimleft(@(&current.line,1,20))))
crlf(0.3281)
&height := &height + 0.3281
endif()
endif(

THANKS YOU
Posted by: Sami786

Re: custome data - 09/03/19 05:13 PM

I resolved this issue my self, thanks you all smile