Use data in html

Started by Frances W., February 22, 2015, 11:37:14 PM

Previous topic - Next topic

Frances W.

Apologies if this is painfully obvious, but how do you include data sent to the report in a html box? E.g. to display a reported date in bold in an otherwise plain text paragraph?

Thanks,
Frances

Romain W.

Hi Frances,

I guess the data is sent from the 4GL source code, right? You have to send an HTML code as a URL. For example:
In .4gl:
LET var="data:text/html,<HTML><BODY>This is a date: <B>" || TODAY || "</B> End</BODY></HTML>"
PRINT var

In .4rp:
Define a HTMLBox and specify 'var' as 'Text'

At runtime, you'll see the following in the generated report:
This is a date: 02/23/2015 End

Does it help? If not, can you tell me how you'd finally like the date to appear on the report document and what variable is sent from the 4GL source? Thanks.

Regards,
Romain W.

Frances W.


Reuben B.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero