cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms-Dynamic Change of Font Size in main window

Former Member
0 Kudos

Hi Friends,

How shall I be able to change dynamically the font size in main window of smartform. If the records are more in main window then the layout comes in 2 pages but if less in 1 page. So I want to decrease the font if the records are more to assign it in 1 page.

Eg : I can print only 10 lines in 1 page of main window, but if the records exceed 10 lines it is going to next page, so I want to shrink the font size to maintain the layout in 1 page.

Thanks & Regards,

Somen

Edited by: Das_SAP on Jun 23, 2009 7:59 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Das,

No you cannot dynamically change the font size.

The main window triggers an automatic page break as soon as the main window is full.

Regards,

Sravanthi

Former Member
0 Kudos

Hi,

SmartForms does not offer the option to set some characteristics at runtime. You must work with conditions in your form.

First find out how many records you have in your table

DESCRIBE TABLE mytable RECORDS sy-tfill.

You create 2 texts nodes with the text to be output and assign the font and font size to them. Obviouly, one node will have a big font size and the other one a normal font size but both contain the same information and same variables.

You can now work with an alternative. If the condition (there are many records for a secondpage) is true, assign text node with normal font size to option TRUE and the other text node to FALSE.

Optionally, every text node has folder CONDITIONS, where you can say

SY-TFILL > 10 lines <-- for text node with normal font size

SY-TFILL <= 10 lines <-- for text node with big font size