cancel
Showing results for 
Search instead for 
Did you mean: 

New page in smartform

former_member628395
Active Participant
0 Kudos

Hi All,

I am working on smartforms. My requirement is,

I am passing an internal table to the smartform. I want to print the contents of the table to a new page when the value of a particular field in the internal table changes. I have defined a table and and used a code construct in it. In the code i have defined a flag which is set to one when the field changes(using At New Stmt). I am using this flag in the 'command' where it is compares to 1 and a new page is triggered(go to new page). The flag concept is working fine. I checked it it using debugger in the code. But still new page is not getting triggered when i check the print preview.

I think i have solved the problem. But now the problem is some part of the data appears on the first page , but the table does not appear. The related table goes to second page, with irrelevant data. and so on...

Please guide me on this.

Sorry for the long post.

Thanks and Regards,

Sagar

Edited by: Sagar on Nov 7, 2008 9:25 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This could be done in smartform if you put control command. Control command is used to forcefully jump the control to next page for certain conditions.

You can get this in Create->flow logic->command.

You can then specify the pagenumber and conditions.Hope this is helpful.

former_member628395
Active Participant
0 Kudos

Hi Sandeep,

Thanks for your prompt reply. But I have solved the problem for page break. But now new issue has come up. Now if there are 2 records in the internal table, which should print only two pages, it will print four. What actually is happening is, according to my guess, the data which is not a prt of internal tabel is getting printed properly. But when the processing goes into the table, it triggers the loop and the nest record is fetched into the Work Area. So it print the second record in the table. This happens till the end, printing N + 2 pages every time.

Please let me know if i am making any mistake.

Regards,

Sagar

former_member628395
Active Participant
0 Kudos

Hi Sandeep,

I solved the problem myself....

Anyways, thanx for your help.

Regards,

Sagar