Recent

Author Topic: Page layout differs between pages in multipage report  (Read 17511 times)

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Page layout differs between pages in multipage report
« on: February 29, 2016, 01:05:33 pm »
I've defined a report with lazreport and this shows/pronts well if the report is only one page long.
As soon as there is more data than fits on one page the second page is missing some of the layout items from the first page (see attached screen print) Page 2 misses a number of lines (top and side lines).
Is this a bug or am I using lazreport incorrectly?
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

balazsszekely

  • Guest
Re: Page layout differs between pages in multipage report
« Reply #1 on: February 29, 2016, 01:58:39 pm »
Did you draw those lines? Try to set stretched property to true. If you draw it to a band, set the same property to true also for the band.

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Page layout differs between pages in multipage report
« Reply #2 on: February 29, 2016, 05:41:16 pm »
Stretched didn't seem to help.
I'm now trying to put the lines in an overlay band, but although there is some improvement it's still a very long way to being right.
It's so easy in FastReport in Delphi, why is it so hard in lazReport?  >:(
Well on with the battle, in the end I will have my report, but it's taking way too long.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

balazsszekely

  • Guest
Re: Page layout differs between pages in multipage report
« Reply #3 on: February 29, 2016, 08:57:27 pm »
@JanRoza
I switched to FortesReport a long time ago. In my opinion is much better then Lazreport. Perhaps you should give it a try someday.

paweld

  • Hero Member
  • *****
  • Posts: 970
Re: Page layout differs between pages in multipage report
« Reply #4 on: February 29, 2016, 10:43:52 pm »
lines must be within the pageheader and pagefooter band. see in attachement example (require sqlite.dll)
Best regards / Pozdrawiam
paweld

ttomas

  • Full Member
  • ***
  • Posts: 245
Re: Page layout differs between pages in multipage report
« Reply #5 on: February 29, 2016, 11:18:40 pm »
@JanRoza
Can you post image of designer or report file

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Page layout differs between pages in multipage report
« Reply #6 on: March 01, 2016, 03:08:34 am »
hello,
in my lazarus database example (lazarus\examples\database\image_mushrooms) , i use lazreport to print a report of all the mushrooms in the database. I have tried to add lines in the report. When i uncheck the page option don't use page margins some objects disappear  in the pages after the first. With the report designed like the first attachment, i get second attachment print preview. But lazreport seems not to be very reliable.
Janroza, maybe your lines are too close to the borders of the page.

Friendly, J.P
« Last Edit: March 01, 2016, 03:19:19 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Page layout differs between pages in multipage report
« Reply #7 on: March 01, 2016, 08:07:51 am »
@GetMem: I used FortesReport too in the past but switched to lazReport after it seemed rather stable and simple. But seeing its behavior now on multipage reports I'll make the same report in Fortesreport now to see how well behaved that will work.

@JP: Good tip, I will experiment with the margins and see if that has effect. If not I think I'll switch to FortesReport.

@Ttomas: I'm constantly changing the report at the moment to try and find a solution so I'm not able to send a stable example at the moment. I'll post the outcome when I find a solution.

Working with a overlay band did not help much either.
I will continue the struggle  8) this evening when I'm home again.
« Last Edit: March 01, 2016, 08:12:35 am by JanRoza »
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Page layout differs between pages in multipage report
« Reply #8 on: March 01, 2016, 09:39:58 am »
JanRoza, lazreport works better without margins for me. I use the don't use page margins option
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Page layout differs between pages in multipage report
« Reply #9 on: March 02, 2016, 04:40:47 am »
hello,
Fortes4Lazarus seems to be more reliable. With the first attachment Fortes report, i get second attachment preview and with multipages , no change for the lines.

Fortes4Lazarus 3.24 r117  , Lazarus 1.6RC1 32 bits windows 7
Friendly, J.P
« Last Edit: March 02, 2016, 04:47:36 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

balazsszekely

  • Guest
Re: Page layout differs between pages in multipage report
« Reply #10 on: March 02, 2016, 06:39:09 am »
Quote
@Jurassic Pork
Fortes4Lazarus seems to be more reliable.
I agree! Not just this line draw thing, generally speaking is more stable, the designer is more functional, etc. Try to run Lazreport on Mac, to be more specific export something to pdf, it's not gonna work.

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Page layout differs between pages in multipage report
« Reply #11 on: March 02, 2016, 07:16:40 am »
JP and Getmem, I agree with you.
I've switched to Fortesreport too now, even after many attempts lazReport only shows the first page correctly and on all other pages I keep missing lines and worse: the header and footer are some milimeters higher on the second and all following pages!
So coming days I'll be spending remaking my reports in FortesReport.
I just saw there now is a community edition of Fortesreport (version 4.0), so it seems it's actively supported.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Page layout differs between pages in multipage report
« Reply #12 on: March 21, 2016, 08:59:39 am »
Quote
@Jurassic Pork
Fortes4Lazarus seems to be more reliable.
I agree! Not just this line draw thing, generally speaking is more stable, the designer is more functional, etc. Try to run Lazreport on Mac, to be more specific export something to pdf, it's not gonna work.

But for quite some time now Fortes cannot compile with Lazarus trunk (1.7) in Windows. See: https://sourceforge.net/p/fortes4lazarus/bugs/8/.

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Page layout differs between pages in multipage report
« Reply #13 on: March 21, 2016, 09:58:17 am »
The FortesReport CE 4.0 version does compile with trunk.
I have Lazarus 1.7 (about a week old) running and FortesReport works well with it.
Have you tried the new Fortesreport CE 4.0 version? You can find it at: https://github.com/fortesinformatica/fortesreport-ce
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

balazsszekely

  • Guest
Re: Page layout differs between pages in multipage report
« Reply #14 on: March 21, 2016, 10:10:15 am »
@JanRoza
Just add LazFileUtils to RLPreviewForm.pas uses clauses:

Code: Pascal  [Select][+][-]
  1. unit RLPreviewForm;
  2.  
  3. interface
  4.  
  5. uses
  6.   {$IfDef MSWINDOWS}
  7.    Windows,
  8.   {$EndIf}
  9.   Messages, SysUtils, Math, Contnrs, Classes,
  10.   {$IfDef FPC}
  11.    LMessages, LCLIntf, LCLType, FileUtil, LazFileUtils, //<--add this
  12.   {$EndIf}
  13.    //...
  14.  

 

TinyPortal © 2005-2018