Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Use data in html  (Read 17797 times)
Frances W.
Posts: 4


« on: February 22, 2015, 11:37:14 pm »

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.
Four Js
Posts: 48


« Reply #1 on: February 23, 2015, 04:08:04 pm »

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.
Posts: 4


« Reply #2 on: February 24, 2015, 01:43:02 pm »

That's perfect, thank you.
Reuben B.
Four Js
Posts: 1049


« Reply #3 on: March 01, 2015, 10:36:43 pm »

As per the documentation https://4js.com/online_documentation/fjs-gst-manual-html/#c_grd_layoutelements_htmlbox.html, you may wish to consider urlencoding the data.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines