Four Js Development Tools Forum

Discussions by product => Reporting tools (GRW, GRE) => Topic started by: Asnidzal M. on April 04, 2014, 12:06:52 pm



Title: Dynamic Font Size
Post by: Asnidzal M. on April 04, 2014, 12:06:52 pm
Hi,

Is it possible to control font size in one 4rp, just using any OO build-in class for GRW(using coding in 4gl) ?


Title: Re: Dynamic Font Size
Post by: Alex G. on April 04, 2014, 12:34:44 pm
Hi,
>Is it possible to control font size in one 4rp, just using any OO build-in class for GRW(using coding in 4gl)
i am not sure that I correctly understand the question.
In case that you want to change the font size of a report based on the value of 4GL variable then this is straightforward since the "Font Size" property can be set by a RTL expression and populated from 4GL variables like any other property.
Example:
In the 4GL report we introduce and ship a "fontSize" variable as follows:
REPORT myreport(fontSize,..)
..
DEFINE fontSize INTEGER
FORMAT
ON EVERY ROW
    PRINT fontSize, ...
END REPORT

In the report design on the page root we set the RTL expression "fontSize" for the property "Font Size".
Since "Font Size" is inherited, all object in the report that do not override the default value will use that value.
In addition to that you can have object further down the document tree use a derived "Font Size" value by specifying an expression like "110%" or "80%".
Regards,
Alex