cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORM Duplicate Table entries on reprint

Former Member
0 Kudos

Greetings Gurus!

I have come across an interesting issue and am not sure how to fix it.  I have a SMARTFORM with a table.  I pass the table from the application program.  Let's say that the table has 3 records.  On the print dialog, I select print preview.  I see 3 lines in the output.  I hit the back button and hit print preview again.  I see 6 lines.  I hit the back button again and hit print preview, I see 9 lines!  What is going on here?  Has anyone ever encountered this before?  Is there a quick fix?

I set-up the table with the data tab filled with the internal table and a working storage line.

I am reading directly from the table passed from the application (could that be the issue)

I have a counter set-up in the calculations tab before-loop

Thank You

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

That wasn't it.  The problem was a loop.  I had the call to the SF in a loop, so each iteration added new records.  Normally, when you exit out from print preview, the program ends.  If it calls the print dialog again, you are in a loop.

Answers (1)

Answers (1)

Former Member
0 Kudos

I figured it out.  Global variables will burn you every time.  Each time you hit print preview, it executes the application program again.  If the table is in a global variable and it is not initialized, you'll get duplicates.  Hope others can benefit from my mistake.

t.e.h.