Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Template or table

Former Member
0 Likes
1,309

In smartforms I need to design a table with fixed no of rows to be output. Is there a way to do this. The data in the rows will be variable though. Should I use a template ?

13 REPLIES 13
Read only

Former Member
0 Likes
1,276

Hi,

In Smart Forms, although templates still have a fixed number of rows, the number of rows in a Smart Form table can be dynamic.In both Smart Form templates and tables, you can determine how many cells a line of a table output should have using the Table Painter's row types

The Template contains a fixed number of rows and columns, where the output is fixed.

The Table can have variable number of rows

Regards

Sudheer

Read only

Former Member
0 Likes
1,276

In my main I need to create a table of exactly 15 rows and this will display the invoice information. If the invoice has less than 15 items then the remaining rows will be left blank else if the invoice has more than 15 items then the next page should have 15 rows and the rest of the items should be displayed on the next page

Read only

Former Member
0 Likes
1,276
Read only

Former Member
0 Likes
1,276

I dont think using a template will work. I need to use a table but merely display 15 rows fixed. Is there a way to do that ?

Read only

Former Member
0 Likes
1,276

Hi Megan,

Template in smartforms is having fixes no of rows.The data in that template are also of fixed lenth. for ur requirement use table.

U create a internal table of 15 records and pass that table into ur

smartform

e.g. data : begin of itab occurs 0,

.........

end of itab.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
1,276

In my Data tab in Table Node I say Loop Internal Table mytable into itab Row 1 to 999999

Should I change this to Row 1 to 15 ?

I dont think this would change anything

Read only

0 Likes
1,276

You can try adjusting the height of your Main Window so that only 15 rows will fit. Then if there are more than 15 rows in your table, it will print the remaining rows on page 2 (assuming you have the Next Page of your First Page set up correctly).

Read only

Former Member
0 Likes
1,276

The problem I have is I want to print 15 rows even if there isnt enough line items

If my invoice has 5 line items, 15 rows should be printed with 5 populated

If my invoice has 20 line items, 15 rows should be printed on first page all populated and the rest 5 should be printed on the next page

Read only

0 Likes
1,276

If you adjust the height of your Main Window to fit 15 rows then when you loop through your data if there are only 5 line items, only 5 will be displayed.

If there are 20 line items only 15 will be displayed because the Main Window is only big enough to support 15 lines. The other 5 will be displayed on page 2.

You could also use a Program Lines node to count the number of lines that are output. When this count reaches 15, clear it and set a flag.

In a Command Node go to page 2 if the flag is set.

Message was edited by:

Matt Nagel

Read only

Former Member
0 Likes
1,276

My page is set to landscape and I set the height of the main window to 18.00 cm, it still does not print blank rows. Basically I need to be able to display blank rows using table . thanks

Read only

0 Likes
1,276

I'm not sure I understand. How can you print something that is blank?

Is the problem that you need borders around blank cells?

Read only

Former Member
0 Likes
1,276

Yes Matt, I need borders around blank cells.

Read only

0 Likes
1,276

I think you are going to need to add some logic in a Program Lines node.

Something like this:

DESCRIBE TABLE i_itab LINES v_lines.

v_mod = v_lines MOD 15.

DO v_mod TIMES.

APPEND wa_itab TO i_itab.

ENDDO.

you can use "APPEND INITIAL LINE TO i_itab" also.

Message was edited by:

Matt Nagel