Skip to Content
author's profile photo Former Member
Former Member

Smartform Loop or Table?

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 04:50 PM

    Create Command within main window and set general attribute as go to new page or specify the page.

    Alternatively you can set condition so that page break command node will be executed based on the condition you have set.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 08:40 PM

    It sounds like you will have to use a Loop. You can have your Table within the loop, just don't have anything in the Data tab. This way you can preserve your line types, text nodes, etc.

    Then as the last step in your loop add a Command node to call a new page. (you may need to set some flags to make sure that you don't call a new page when you are done printing the last item in your loop).

    I did something similar, but had the command node as the first node in my loop. In the command node I had conditions so that it would only go to the next page if this is not the first loop (i.e. clear the flag before the loop, then set it at the end of the loop).

    I hope this makes sense and that it helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.