cancel
Showing results for 
Search instead for 
Did you mean: 

Page break for Smartform with multiple main window on pages

Former Member
0 Kudos

Hi Experts,

I have a requirement for printing 3 pages. The difference among the 3 pages is the main window part.

The main window contains not only internal table, also complicated texts like payment instructions etc.

The requirement is in each page, the data in internal table should be changed, also payment instruction should be changed accordingly.

e.g:

Main Window of Page 1

Part 1 for Internal table

VAT on ITEM ------- 4O-------60,00------0.00%-------EUR

Part 2 for Payment Instructions

Texts for Page 1

Main Window of Page 2

Part 1 for Internal table

VAT on ITEM ------- 5O-------60,00------0.00%-------EUR

Part 2 for Payment Instructions

Texts for Page 2

Main Window of Page 3

Part 1 for Internal table

VAT on ITEM ------- 6O-------60,00------0.00%-------EUR

Part 2 for Payment Instructions

Texts for Page 3

At first, I was using only one page 'Page1' with a variable page_no = 1 as default value, and use program line page_no = page_no + 1 as counter. when page_no = 2, use command for force page break to 'Page1', then under the command, change the internal table and payment instruction texts. when page_no = 3, ...

But I encountered an error saying:

Runtime Errors GEN_BRANCHOFFSET_LIMIT_REACHED

Short text

Jump distance is too large and cannot be generated.

So I created 3 pages, with different main window M_window1, M_window2, M_window3 for each page. In page1, after printing the M_window1, page_no = 2, use command to go to page2, but page2 is never printed. I think this is because only one main window can exist in a smartform? but why smartform allows creating individual main window for different pages? what's the use of such main window?

By the way, what's the use of command for force page break? only work for one main window in a smartform?

Getting back to my requirement, I think I should still use one page and command for page break. I am trying to solve this.

Thanks.

Li Jun Da.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Now I am using 3 pages: Page 1, Page 2, Page 3.

Page 2, Page 3 are copies of Page 1 with main window renamed as second window: mw 2, mw 3.

I also created 2 command nodes in main window of page 1: cmd 2, cmd 3.

cmd 2 is for page break to Page 2, cmd 3 is for page break to Page 3.

The second window mw 2, mw 3 in Page 2, Page 3 can be displayed.

Even though, I still can't understand how main window of pages (not 1st page) can work.