Hello people.
Could someone please tell me why the 2nd line of code after the ELSE Statement
crashes. The code leads to a report where product and cost is in a list.
Many thanks. Shane.
NB: Seems like Chr(13) is a problem, but why?
Scan
If Eof()
Return
Endif
If Empty(_saleproducts) And _salecost=0
_saleproducts=Ltrim(Str(sales.units))+' '+Trim(sales.brand)+' '+Trim(sales.Description);
+' '+Trim(sales.Type)+' '+Trim(sales.Style)
_salecost=sales.cost
Else
_saleproducts=Alltrim(_saleproducts)+Chr(13)+Ltrim(Str(sales.units))+' '+Trim(sales.brand);
+' '+Trim(sales.Description)+' '+Trim(sales.Type)+' '+Trim(sales.Style)
_salecost=_salecost+Chr(13)+sales.cost && THIS CODE
Endif
Endscan
Endif
Could someone please tell me why the 2nd line of code after the ELSE Statement
crashes. The code leads to a report where product and cost is in a list.
Many thanks. Shane.
NB: Seems like Chr(13) is a problem, but why?
Scan
If Eof()
Return
Endif
If Empty(_saleproducts) And _salecost=0
_saleproducts=Ltrim(Str(sales.units))+' '+Trim(sales.brand)+' '+Trim(sales.Description);
+' '+Trim(sales.Type)+' '+Trim(sales.Style)
_salecost=sales.cost
Else
_saleproducts=Alltrim(_saleproducts)+Chr(13)+Ltrim(Str(sales.units))+' '+Trim(sales.brand);
+' '+Trim(sales.Description)+' '+Trim(sales.Type)+' '+Trim(sales.Style)
_salecost=_salecost+Chr(13)+sales.cost && THIS CODE
Endif
Endscan
Endif