Recent

Author Topic: *.lrf files - how is MemoView related to report band?  (Read 3513 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
*.lrf files - how is MemoView related to report band?
« on: November 18, 2015, 05:34:11 pm »
I created a very simple report driven by a user data source (StringList). The report has three bands: a ReportTitle, MasterData and Footer bands. Each band has a single MemoView object. The report is attached with an extra ".txt" appended, so I could attach it here.

Now examining the .lrf file (which is actually just XML), the Bands and MemoViews are all defined at the same node level in the XML. So how does LazReport know which MemoView is related to which band? Logic would have told me that each MemoView should be located inside the Band node they relate to... giving you a hierarchy of dependency. But LazReport doesn't seem to do that.

Look at <Object4> as an example. It contains the title of the report, but nowhere in the .lrf file does it say it belongs to the ReportTitle band. This is very confusing to me. Needless to say, I'm a bit puzzled by this. :)
« Last Edit: November 18, 2015, 06:15:08 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: *.lfm files - how is MemoView related to report band?
« Reply #1 on: November 18, 2015, 05:43:43 pm »
If my memory serves me right there is no parent child hierarchy in freeReport or FastReport (lazREport is based on freeReport) the only thing that defines the parent is the position of the memo in the page move it outside the band and its no longer governed by the band's rules.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: *.lrf files - how is MemoView related to report band?
« Reply #2 on: November 18, 2015, 06:14:07 pm »
Wow, that sounds like a crazy (ugly) design choice. But you seem to be correct. I just tried with my simple .lrf report, and indeed I could simply drag the MemoView from the MasterData band into the ReportTitle band - and then sudden my report was screwed (only the first record gets printed).

But at least that relates (and explains) the results I saw in my other forum post (creating a report purely in code).

Many thanks for the information.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018