[Lazarus] lazreport: how to use global report variables

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue Jun 30 17:35:54 CEST 2015

On 2015-06-30 14:03, Graeme Geldenhuys wrote:
> I've used File -> Variable List to define a new variable (just the name).

Digging deeper into the LazReport code, I finally found the solution.

Even though you setup a variable, you must not refer to it via the
Scripts.Values[] or Variables.Values[] properties. Go figure!

Instead you use the Values.FindVariables() method.

  FRPrint.Values.FindVariable('HideKlas').Field := '1';

For more details of what I've done, see the Lazarus Forum post.

Now this begs the question... What the hell does Scripts.Values[] and
Variables.Values[] actually do?

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the Lazarus mailing list