Forum > LazReport

Header issues

(1/2) > >>

laz_frank:
Hi!

While LazReport seems to be pretty versatile and stable, there are three quirks I haven't been able to find a fix for so far:

1) Sometimes the error '... Undefined symbol: SqlQuery."fieldname" ' appears, even though this field is displayed exactly like this in the DB field list within LazReport designer. Most of the time the error message points to a different band than where the field was actually placed. Unfortunately, I can't reproduce this behaviour reliably yet.

2) When trying to print some master data fields in the page header (option 'On first page' enabled), it doesn't print the correct values of the current data record (see example below).

3) Option 'Show on all pages' makes no difference for master header band regardless if enabled or disabled (see example below, option enabled).

Any ideas of what I'm doing wrong? TIA!

Frank

 

dseligo:

--- Quote from: laz_frank on March 24, 2022, 03:45:50 pm ---1) Sometimes the error '... Undefined symbol: SqlQuery."fieldname" ' appears, even though this field is displayed exactly like this in the DB field list within LazReport designer. Most of the time the error message points to a different band than where the field was actually placed. Unfortunately, I can't reproduce this behaviour reliably yet.
--- End quote ---

Do you get this error in design phase or when using report?


--- Quote ---2) When trying to print some master data fields in the page header (option 'On first page' enabled), it doesn't print the correct values of the current data record (see example below).
--- End quote ---

It would be great if you can make small test project with test data and show what you would like to achieve.


--- Quote ---3) Option 'Show on all pages' makes no difference for master header band regardless if enabled or disabled (see example below, option enabled).
--- End quote ---

I didn't use it like this, but I just tried it and it shows on all pages for me. What Lazarus version are you using? I tried this on Windows 11, Lazarus 2.2.0.

dseligo:
Here is small test project I used to try 'Show on all pages' option for Master header band.

laz_frank:
@dseligo: Thank you for taking the time to answer and providing a test project!

1) I get the error during preview in the designer and when using frReport.ShowReport.

2) Yes, maybe I'll find the time to finish a test project tomorrow. What I want to achieve: As I couldn't force the master header to appear on all pages, I tried to get the database fields of interest to print within the page header. I expected to get data of first record on the first page, but got data of the second record on the first page (please compare page header data on page 1 with master data on the same page).

3) I'm on Windows 10 and Lazarus trunk (2.3.0) but installed Lazarus 2.2.0 fixes and tried your test project: Works as expected. But when the option 'Show on all pages' is disabled, nothing changes. So it's just the other way around in your project than in mine.

dseligo:

--- Quote from: laz_frank on March 26, 2022, 02:51:38 pm ---But when the option 'Show on all pages' is disabled, nothing changes. So it's just the other way around in your project than in mine.

--- End quote ---

Strange. It works as expected for me.
I attached project where 'Show on all pages' is not enabled, can you try it?
If it shows master header on all pages then maybe there is something wrong with your Lazreport installation. If it shows master header only on first page then maybe you didn't disable 'Show on all pages' properly.

Navigation

[0] Message Index

[#] Next page

Go to full version