Skip to Content
avatar image
Former Member

Smartforms-Dynamic Change of Font Size in main window

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 23, 2009 at 12:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 23, 2009 at 12:45 PM

    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

    Add comment
    10|10000 characters needed characters exceeded