Four Js Development Tools Forum

General => Ask Reuben => Topic started by: Reuben B. on June 17, 2021, 04:51:12 am



Title: Ask Reuben 78 - Slightly Different Reports
Post by: Reuben B. on June 17, 2021, 04:51:12 am
When producing documents, sometimes you need to generate multiple copies, and you need to annotate each copy so that you know which is the official document or if it is a copy.  This should not take two or more .4rp files, nor should it require hitting the database twice.

Also in a report sometimes you may have a need to include an environment variable in either the output or as part of the logic of the report.

The solution to both involves the same technique.

At runtime when your report is produced you can read an environment variable by using a method getEnvironmentVariable that is part of the Runtime class you can include in an RTL expression.  You can use this to change some property in the report, normally the text property but it could be used in other properties as well.

Read more at https://4js.com/ask-reuben/ig-78/