cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform Printing

Former Member
0 Kudos

Hi,

Can anyone please help me with this.

I have a pre-pprinted invoice form.

I want to restrict the no.of line items printed on each page to 7 and then calculate the sub total and total.

I am using the standard form and print program for this.

Also I cannot reduce the size of the main window where the line items will be printed.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I dont think you can get this stuff done while printing it out,

The best way to do is, before throwing it for printing see that the below logic is added to your item table .

1.

In the item table , take another field of Counter ok and try to increment this counter for every 7 records , ( first seven item records count = 1, and for > 7and <14 records count = 2 so on..) .

2.

Take another table having only Counter field ( see if it matters to take other key fields also into it ) ,say table gi_header.

3. Finally

under main window

loop the header table first (GI_HEADER)

under this use your ' TABLE node' on item table and in Conditions Tab- set Gwa_item-count = gwa_header-count.

after this table node , set a COMMAND NODE and set the next page to page1 or page 2 as asked .

I can Asure you this is going to meet your requirement .

Please do not forget to reward it...

Answers (2)

Answers (2)

Former Member
0 Kudos

Create a Table in Main window of Smartform . In this Table under the Data Tab you can define the number of records you want to display. In your case 7

And in the same Table Option under the tab Calculation you can perform your subtotal calculations.

Regards,

Rohit

Former Member
0 Kudos

Thanks Rohit,

I had done that earlier.But how do I get the other remaining records in the next page? If I put 1 to 7 in the table how do I print the remaining , lets say 7 on the next page.

Former Member
0 Kudos

Hi Dishant,

take a counter and with every loop pass increase the value of counter.

Instead of specifying the number of rows you can add COMMAND node and check the go to new page checkbox. Add condition that value of counter should be 7 and clear it for further passes.

Thanks,

Utsah Garg.

Former Member
0 Kudos

Hi Utsah,

I tried that as well.But it prints only on one page all the line items whereas I have to restrict them to 7 on each page. Do I give anything in the loop that I have created? I have left that as blank as I am not sure.

Thanks,

Dishant

amit_khare
Active Contributor
0 Kudos

If you are using Tables in SMARTFORMS then just mention the number of rows in the DATA tab for the select statement.

If you are using LOOP command then use a counter for the same.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

It does not work with either.I am looping the table and resetting the count also.If I make the table to print from 1 to 7 it prints only 7 line items on page one and nothing on the next page.

amit_khare
Active Contributor
0 Kudos

Yeah it will not print on next page for that you have to repeat the process, but if you want to do for both then take a counter and count inside the loop and check the condition for it.

When the counter is > 7 call the next page.

For this you can use Condition Node inside your table .

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Could you please explain by what you mean to repeat the process? I have already taken a counter and incremented it inside the loop.I checked the command to go to the next page but still it prints only 1 to 7 line items if I give that in the data tab in the table.I f i dont then it prints all items on one page.

Private_Member_17805
Participant
0 Kudos

Hey dishant,

I have mailed to screen shots.Hope its of some help.

Bye

Jayant

former_member632991
Active Contributor
0 Kudos

Hi,

Since u cannot restrict the size of main window and cannot make other changes , then create ur own Z form for this.

Regards,

Sonika

Former Member
0 Kudos

I am making my own Z form as the layout has been changed.The print program is the same. Is there some way in which I can delete the entries from the table once they get printed and trigger the next page?