Skip to Content
0
Former Member
Jun 10, 2010 at 02:52 AM

Page break for Smartform with multiple main window on pages

129 Views

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.