Forum > Beginners

LazReport with multiple stretched memos in same band does not work

(1/2) > >>

I am new to this forum and Lazarus, so I may get things wrong here. I am using Laz 2.0.12 on windows 10 with SQLite3.
I have a report that requires more than 1 stretched memo (one full width memo after the other) on the one stretched band.
Each memo is connected to a field in the database. eg. Field1=Memo1, Field2=Memo2 etc.
When I preview the report it does not stack the memos one after the other then stretch them but stretches to the largest of all memos on the band from where they are placed in design mode, on top of each other.
How do I get multiple stretched memos to work correctly, eg move down when 1st memo stretches and then stretch next memo.
I have tried putting them on different bands (even different types of bands) but that does not work as it prints all the first memo records before printing the next memo records even though they are on the same Database record.
I did get it to work in preview when in design mode (by not assigning the second band a dataset) but soon as you go to Show report in the running app it goes wrong again. See attached examples.
Is this a bug or am I missing something simple.

I can only picture your issue...

if it works in designer mode than maybe you are using the anchors to keep things aligned..

at runtime you need to also do this, set the anchors etc..

Thanks for the reply.
You say you can only picture my issue ?
Did you see the attachments showing the design setup and related preview and running version ?
What anchors are you referring to ?
I have not seen anything to do with anchors in the report writer.
I don't believe I anchored anything, just place them in the bands, and I don't change things from design to running (Showreport).
I have even run this in Fortes report and the bands and stretching I can get to work but it has a different problem of having the second band (with 3 columns) and memo's stretch with extra lines after each paragraph for the 3 columns, so there are large gaps at the end of each column (almost like it thinks each line from each column is added to the stretch length).
So that doesn't help either.
Any other thoughts would be appreciated.

Yes, of course I looked at the images but you are not showing any code nor do I have lazreport installed over here but that does not mean I am clueless.

if you are creating memo's on the fly and parenting them in the lazs report then I assume you also are aware that you need to turn off the Alignment and do this manually at some point like in some update event.

Jamie, Thanks for the reply.
I am not creating memos on the fly. The report is created in the VCL designer and saved so that it is called with 1 call ReportName.Showreport.
The report is simple and the fields are tied to the memos in design mode in the report, there is no code written in Lazarus or the report to change the report at runtime. The alignment is not changed at anytime.
That is why I say it is probably a bug.
I don't change anything from previewing the report while in design mode to running it in the application.
Again thanks I will just persist and try other options.


[0] Message Index

[#] Next page

Go to full version