Recent

Author Topic: Reports with more columns than fit on a page  (Read 3380 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Reports with more columns than fit on a page
« on: July 03, 2015, 01:40:08 pm »
I have a report that has a dynamic range of columns. Currently we have two report files - one with 9 columns (portrait) and one with 15 (landscape). If we want larger number of columns, how could I create such a report?

Our first thought if the user select more column than what each report can handle, then we simply print the report multiple times. eg: Using the portrait report. First print use columns 1-9 data, then the second report might print columns 10-18 etc. This seems relatively simple to do (but maybe there is a better solution?). The problem with our idea is page numbers? If we print the report multiple times, the pages numbers are incorrect, each run always starting at page 1.

Any thoughts on how to solve the multiple columns and the page numbers?  Or can LazReport print larger than a page report, and span it automatically over multiple pages (eg: what Excel or OpenOffice Calc can do?
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

korba812

  • Sr. Member
  • ****
  • Posts: 394
Re: Reports with more columns than fit on a page
« Reply #1 on: July 03, 2015, 02:18:39 pm »
Hi.
You can use "Cross Data" band for that. Check "userds" sample project in LazReport and this link:
http://lazarusroad.blogspot.com/2011/07/generic-cross-data-report-with.html

Another example is TfrPrintGrid
http://svn.freepascal.org/svn/lazarus/trunk/components/lazreport/source/lr_pgrid.pas
« Last Edit: July 03, 2015, 02:37:13 pm by korba812 »

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Reports with more columns than fit on a page
« Reply #2 on: July 03, 2015, 03:52:41 pm »
Fantastic, thank you so much!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018