cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORM - Printing 3 tables in 2 different pages.

Former Member
0 Kudos

Hi all,

I have a form with 3 pages. In the PAGE 1 I need to print data of 2 different tables. These data may not fit in this first page and a second page can be printed. In PAGE 2 I also have a table that may get big enough to "push" all other windows to a second page. And we have a "normal" PAGE 3.

I create a form with these 3 pages. In PAGE 1 I've put one of the tables in a main window. The second table I put in another window.

PAGE 1 next page -> PAGE 2

PAGE 2 next page -> PAGE 3

PAGE 3 next page -> PAGE 3

I can't activate the form. I have problem because of the main windows in each table.

Help me.

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Are the layouts of your PAGE1 and PAGE2 different? If so you could have something like this;

PAGE 1 next page -> PAGE 1

PAGE 2 next page -> PAGE 2

PAGE 3 next page -> blank

with one main window over PAGE1 and PAGE2. Your main window contains your 3 tables

TABLE1

TABLE2

Command node to trigger PAGE2

TABLE3

Command node to trigger PAGE3

Regards,

Nick

Former Member
0 Kudos

Yes, the layout of my tree pages are totally different.

I'd like to know how can I have my main window over PAGE 1 and 2.

And there is one more thing, the layout of PAGE 2 includes TABLE 3 on top (or first) and then I have to print a grid (which I'm going to do using templates). How can I make this template be print right after TABLE 3 in main window?

Thanks so far

All helpful questions will be rewarded!

Former Member
0 Kudos

A main window can easily cross two pages. Once you've created your pages and the main window on one of them copy and paste it to the second window. Any changes to the contents of the main window will be reflected in both copies. They can have different height and position on the different pages, but everything else will be the same.

To include your template try;

TABLE1

TABLE2

Command node to trigger PAGE2

TABLE3

TEMPLATE

Command node to trigger PAGE3

Regards,

Nick

Former Member
0 Kudos

I did it but didn't work. I'm getting sy-subrc = 1.

I've copied main window to PAGE 2.

My main is like this:

TEMPLATE 1

TABLE 1

TEMPLATE 2

TABLE 2

COMMAND PAGE 2

TEMPLATE 3

TABLE 3

TEMPLATE 4

TABLE4

And in the last window of PAGE 2 I've put a COMMAND PAGE 3.

Former Member
0 Kudos

Sy-subrc = 1 is a bit of a catch-all, so could be down to any number of things.

Check the row/column values in the text elements in your template are accurate and (if you're using a 4.6c system) the cells of the table.

The command to trigger PAGE 3 will also need to go in your main window, at the end.

Regards,

Nick

Former Member
0 Kudos

For sure, sy-subrc = 1 in Smartforms is a very tricky return code. The problem was in a template in PAGE 2 which height was greater than the window's size.

Now I can print my 3 pages. Great!

But I still have a little problem.

My PAGE 1 is like this:

HEADER (many windows)

TEMPLATE 1 ( main window)

TABLE 1 "

TEMPLATE 2 "

TABLE 2 "

COMMAND PAGE 2 (main window)

When I have too many entries in TABLE 1 or TABLE 2 a new PAGE 1 is printed. Ok. But this is <b>almost</b> what I wanted. Because in this second sheet of PAGE 1 is printed with the HEADER again. I don't want any header in this sheet 2.

I tried to use the condition "only on first page" in my HEADER but didn't worked. What can I do?

Former Member
0 Kudos

Hi Josie,

The reason is probably bcos Page 1 has itself as the next page.

So the First Page condtion is satisfied twice

You can either set Page 2 as next (if not too troublesome)

or set flags like a table counter (if the table has already printed its first line, no need to print the header window.

Former Member
0 Kudos

Hi All

Thanks for all your help!

I couldn't set PAGE 2 as next page of PAGE 1 as Nehal suggested because of the problems I was having when I opened this thread.

So I've adapted the first help of Nick Young. As my TABLE 1 and TABLE 2 of PAGE 1 can be too large, I've create a PAGE 4 and also have copied the main to PAGE 4 and made it cover all the page. And made PAGE 4 next page of PAGE 1. So when data in TABLE 1 or TABLE 2 don't fit in PAGE 1, it prints a whole new page for these data and my MAIN window has a trigger to call PAGE 2 in the right time.

Thanks again!

Answers (1)

Answers (1)

former_member195383
Active Contributor
0 Kudos

for page3 dont put anything in " next page".

Put it as blank.

And dont put any main window in page3(if u are not printing any table in it:i.e the last page).Then u can activate ur form as usual.

keep it as

PAGE 1 next page -> PAGE 1

PAGE 2 next page -> PAGE 2

PAGE 3 next page ->

reward if the answer is useful.........

Regards

Rudra