Skip to Content
0
Former Member
Oct 18, 2006 at 08:30 AM

Smartform Loop or Table?

23 Views

I am using a copy of the standard smartform: /SMB40/MMGR3_A

This is a form for Good Receipt slip...

I have a made a few amendments to the form and now I have been asked to change the output so that only one line item is printed per page. I have tried everything to force a page break, but I have not had any success for 2 days.

What I have tried to do was:

1) Go to the TABLE Node "DATA", and then select the DATA tab

2) Ticking Already Sorted checkbox

3) Then entering the field ZEILE (line item nr.) for the field name

ZEILE is a component in the Field Symbol work area

a) I tick EVENT on Sort Begin

b) ...and EVENT on Sort End

At this point I activate the form (just for test purposes) and test the form. I get the form printing with all the data, however, I still have not coded anything that would force a page break.

Now, I edit the form again, this time I go to the newly created event node "ZEILE Event on Sort Begin" and create a COMMAND so to "Go To New Page":

1) I tick go to new page

2) I have 2 pages on my form, First Page and Next Page...

3) So I choose, go to new page >> NEXT PAGE

4) For a condition I input <TRAPTAB>-ZEILE <> 99 (just for testing) and I get a dump (the form does not print)

Only when I remove the COMMAND does it not dump

I think, from reading on the Forum, that it is not possible to use the Command below a table Node.

So I will try to change the Form to use LOOP instead. Is this massive change necessary? Or do you have a more simple and easy fix to suggest to me? If I must use LOOP then where do I specify my LINE Types

Thanks Vincent