cancel
Showing results for 
Search instead for 
Did you mean: 

print in new page while working with template

Former Member
0 Kudos

Hi all

I have created a form which has a template for printing invoice.

I am trying to print data from a table in one LINE in template. Since the height of LINE is not sufficient to display all records in the table, I want to display the remaining entries on next page. I am a beginner and I have been searching around but could not get proper help.

Please guide me on how to achieve this functionality.

regards

Harsh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It is recommended to use tables instead of template for printing data from a table.The templates are used for static data where the size of data is known.

Now in your case if you use a table the data will itself flow to the next page if it is not fitting on tthe same page.

The approach would be same for designing the table as with template and dropping your table fields on to the cells in the table.

Revert in case of any doubts.

Regards,

Abhi

Former Member
0 Kudos

I am trying to create a smartform for invoice.

My requirement is that the area for displaying items is fixed, that is why I have created a template to keep the height fixed.

The problem is that if the items are more and can not fit in the allotted space, rest of items are not displayed.

And if I use table for this purpose then the area for displaying table is changed as the number of items in the invoice change.

Kindly help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Harsh,

As Abhi mentioned, it will be better if you can use table to print line details if you are not sure how many line it would be.

If you know the number of lines, then you can use with the template also, but I will recommend to use table structure only.

If you are calling the same in the MAIN window and the data flows, then it should be print in the next page and it will follow like this till end. It is the property of the MAIN Window.

Please make sure that you called the same inside the MAIN window.

Please revert if any more queries.

Regards,

Selva K.

Former Member
0 Kudos

I have tried it using the tables but the problem is I want to limit the number of rows printed on one page say 10 rows (not more not less) on one table.

If there are more rows they should shift to next page and if there are less rows then blank rows should be added.

Can this functionality be implemented?

Former Member
0 Kudos

Hello,

Yes, it is possible.

Just have a counter starts with 1 and add 1 for every record. Have a condition at the initial line in the main area whether the counter is greater than 10.

If yes, call a command node and goto the next page. Donu2019t forget to refresh the counter and make it as 1.

Please ask if you require more details.

Regards,

Selva K.

Former Member
0 Kudos

thanks Selva. It works.

Can you also tell how can I refresh the counter to 1 at every new page.