Lazarus
Programming => Packages and Libraries => LazReport => Topic started by: joceravolo on September 13, 2019, 11:17:48 pm
-
Hi Guys,
I am new to this and I am using Codetyphon 6.8.
I want to create a variable to display the page count in this format:
Page X
I created a variable with this expression 'Page ' + inttostr(PageNo)
That gives me an error that it expects string but is getting boolean.
I can't find samples for the reports. That would help.
Thanks in advance,
Joe.
-
Hello joceravolo,
Welcome to the forum.
You don't need to create a variable for it. Double click on the frReport component and do these:
1. Click the insert rectangle object (on the left toolbar) and click on the location you want to put it
2. Put this: Page [PAGE#] in the text editor
3. Click the OK button to close the editor
Note:
This Lazarus/FPC forum, not CodeTyphon.
-
Thanks Handoko.
But on Dephi I use variables extensively.
Not only for page number, most of the times I use variable made from the database fields to accomplish different things.
-
Use variables, see https://wiki.freepascal.org/LazReport_Tutorial#General_purpose_variables (https://wiki.freepascal.org/LazReport_Tutorial#General_purpose_variables) and OnGetValue event.