[Lazarus] lazreport: how to use global report variables

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue Jun 30 15:08:06 CEST 2015


On 2015-06-30 14:03, Graeme Geldenhuys wrote:
> ===================================
> If FRPrint.PrepareReport then
> begin
>   FRPrint.Variables.Values['HideKlas'] := '1';  // for testing only
>   FRPrint.Preview := FAfdrukForm.PrintPanel;
>   FRPrint.ShowPreparedReport;
> end;
> ===================================


I've even tried removing the "HideKlas" variable completely, then do
something like this in the .pas unit.

  (FRPrint.Pages.Pages[0].FindObject('memo5') as TfrMemoView).Visible :=
False;
  FRPrint.Preview := FAfdrukForm.PrintPanel;
  FRPrint.ShowPreparedReport;

But not even that works. In this case the memo5 is always shown, as if I
didn't have that extra line of code.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list