Recent

Author Topic: LazReport Grouping  (Read 3223 times)

pmesquita

  • Jr. Member
  • **
  • Posts: 62
LazReport Grouping
« on: July 02, 2021, 09:37:03 pm »
Personal..

I had a kind of "strange" situation with LazReports...
Well, I put together a report with the following structure:

Code: Pascal  [Select][+][-]
  1. GroupHeader1
  2.   -GroupCondition: FIELD01
  3.  [MEMO01]
  4.  [MEMO02]
  5. GroupHeader2
  6.   - GroupCondition: FIELD02
  7. MasterData
  8. GroupFooter
  9. PageFooter

So far, it worked perfectly... except that when breaking and generating a new page the GroupHeader1 was not printed even with the option "Show on All Pages" activated...
Summarizing to solve I had to change the report to:

Code: Pascal  [Select][+][-]
  1. PageHeader1
  2. GroupHeader1
  3.   -GroupCondition: FIELD01
  4.  [FIELD01]
  5. GroupHeader2
  6.   - GroupCondition: FIELD02
  7.  [FIELD02]
  8.  [CAMPOXX]
  9. MasterData
  10. GroupFooter
  11. PageFooter

Only then was I able to make lazreport generate the report and print the GroupHeader1 on all pages and perform the page break. But what intrigued me was that the field, which is a memo, [CAMPO02], it needs inside GroupHeader1 to perform the break.

In my software I create the Dataset at runtime and only associate it with the TfrReport object that loads the report..

Is this really the case or is it some limitation of lazreport?

 

TinyPortal © 2005-2018