Lazarus

Programming => Packages and Libraries => LazReport => Topic started by: kito on May 16, 2019, 11:55:19 pm

Title: [Solved] lazreport : master/detail bands arranging issue
Post by: kito on May 16, 2019, 11:55:19 pm
Hello
I Have a datasets in a master detail relationship and I am facing two problems showing it properly with lazreport .
*The first issue : master header in certain cases appears in the bottom of the page and their details in the next page . and showing each master  header in new page wont help in my case .

*The second issue : at the end of the table I used a master footer band with script visible at the end of the last page witch also  some times appears lonely  in the head of the last page because there are no free space left in the previous page .

I would appreciate any help even a short hints  :)  .
Title: Re: lazreport : master/detail bands arranging issue
Post by: kito on November 11, 2019, 10:04:30 pm
hello again it has been 120 days since posting this  :-[  and it's all my bad I couldn't explain the issue clearly so I upload this image hopefully it clarifies better the problem, I need to keep both detail header band and d├ętail data band in the same page and avoid printing detail header alone in the bottom of the page in some cases when it doesn't suit it.

https://www13.0zz0.com/2019/11/11/23/459894945.png

(https://www13.0zz0.com/2019/11/11/23/459894945.png) (https://www.0zz0.com)

Title: Re: lazreport : master/detail bands arranging issue
Post by: GAN on November 11, 2019, 10:48:04 pm
Right click the header band and you find a few options that may be help you.
Title: Re: lazreport : master/detail bands arranging issue
Post by: kito on November 12, 2019, 12:03:20 am
Right click the header band and you find a few options that may be help you.
thanks GAN for your reply, I already tried  every single option nothing changes except if I select force new page which doesn't  solve the issue it made every single detail table shows in a separate page .
Title: Re: lazreport : master/detail bands arranging issue
Post by: GAN on November 12, 2019, 12:38:48 am
You can try using groups instead of master/detail.
Here is the manual of FastReport that is very similar, check it https://www.fast-report.com/public_download/UserManual-en.pdf (https://www.fast-report.com/public_download/UserManual-en.pdf)
Title: Re: lazreport : master/detail bands arranging issue
Post by: kito on December 04, 2019, 09:06:56 pm
You can try using groups instead of master/detail.
Here is the manual of FastReport that is very similar, check it https://www.fast-report.com/public_download/UserManual-en.pdf (https://www.fast-report.com/public_download/UserManual-en.pdf)
I really appreciate your time and your suggestions, I tried  what the manual said and I made some changes to my project  but nothing changes I did check every step   :(
Title: Re: lazreport : master/detail bands arranging issue
Post by: kito on February 12, 2020, 02:48:30 am
I somehow found a solution it's very awful  ::), but at least it did solve my problem.
in lazreport I made a single master data band and I counted how many rows needed to fill all the page which was in my case 59 .
I made a temp table as an Adapter, I fill on it all my mater data/ detail fields successively
using two loops blocks . inside the master loop block, I made a check if (line mod 59 = 0) then insert an empty line which will eventually push this last line to a new page  and  VOILA, thank you GAN I hope you see this reply
Title: Re: lazreport : master/detail bands arranging issue
Post by: GAN on February 12, 2020, 03:01:16 am
Hi @kiko thanks for share the solution you found. LazResport is great, but you need time and a lot of tests.

Regards,
GAN.

May you edit the subject of the post and add (Solved)?
TinyPortal © 2005-2018