Recent

Author Topic: LazReport / FreeReport question ...  (Read 472 times)

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 253
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
LazReport / FreeReport question ...
« on: August 15, 2024, 06:56:36 pm »
Anyone familiar or have used LasReport to create a report of data from data fields.  My question is simple, I've created a simple report with title at the top  with the Report Title on the Report Title Band, Fields Titles on the Page Header Band and the fields data to print on the Master Data Band.  Fairly easy to setup and prints great... But, trying to have printed on the Page Footer band, Page x of xx, i.e. Page 1 of 1, Page 1 of 2, etc.  From the documentation it appears that I have to define a couple of variables under File-Variables List. I attempted to create a couple of variables, i.e. nPage &nTTLPages.  But can't type an expression.  Anyone help, thanks!


paweld

  • Hero Member
  • *****
  • Posts: 1217
Re: LazReport / FreeReport question ...
« Reply #1 on: August 15, 2024, 08:47:22 pm »
To print the total number of pages correctly, you must select in the report options: two-pass report.
Other than that, you have basic variables like page number, line number, etc. under the Variables button in the Memo editing window.
A simple example is attached.
Best regards / Pozdrawiam
paweld

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 253
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: LazReport / FreeReport question ...
« Reply #2 on: August 15, 2024, 10:13:48 pm »
PaWeld, Okay, thanks, I kind of was almost there and looking at your example, I had created a variable for page no and another for total pages but finally figured out I had to insert a rectangular object down on the Page Footer and just type in Page [varPage] of [varTTLPages].  Thanks for the example and suggestions.
Moving on to create the other reports for this application.

 

TinyPortal © 2005-2018