>>>>What could be a problem and how to make sure each command runs as a separate print job?
>>>
>>>[set printer to] should close the Printer Job.
>>
>>Well, I'm still getting both labels printed into one PDF file. I'm using CutePDF printer. I also tried
>>set printer to null
>>
>>but still got the same result.
>
>SET PRINTER TO DEFAULT?
I think I figured out my problem - now I just need to figure out how to re-write this correctly.
Ok, now, will you figure this out also?
if not empty(m.lcPrinter)
select r_invent
go top
BROWSE FOR layout == m.lcLayout
scan for layout==m.lcLayout
=MESSAGEBOX('Test')
set printer to name (m.lcPrinter)
report form (m.lcLayout) to printer noconsole nodialog
set printer TO file ''
endscan
endif
Hint - I only see message test once.
UPDATE. Yes, I fixed it. I think set printer does not even need to be there in the scan loop.
If it's not broken, fix it until it is.
My Blog