>Parameters iduvaltsql >lcRetval = '' > >Select PRRE >Scan > > TEXT to msel textmerge noshow pretext 7 > select REM , ERE, CR from prre where prre.ere > 0 and prre.prstamp = '<<Alltrim(iduvaltsql)>>' > And prre.prrestamp = '<<Alltrim(prre.prrestamp)>>' > ENDTEXT > > If u_sqlexec(msel,[CrsREM]) > Select CrsREM > If CrsREM.ERE > 0 And Not Inlist( CrsREM.CR,21,26) >text to lcTextRem textmerge noshow ><<PADL(CrsREM.REM,30)>><<PADL(astr(Transform(CrsREM.ERE,'999999999.99')),19,' ' )>> >endtext > > lcRetval = lcRetval + lcTextRem + Chr(13) Else > If CrsREM.ERE > 0 And Inlist( CrsREM.CR,21,26) >text to lcTextRem textmerge noshow ><<PADL(CrsREM.REM,30)>><<PADL(astr(Transform(CrsREM.ERE,'999999999.99')),19,' ')>> >endtext > lcRetval = lcRetval + lcTextRem + ' (*)' + Chr(13) > > Endif > Endif > Else > msg(msel) > Endif >Endscan > >Return lcRetval >>