KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Headers & page numbers #297

Open Mike Thomson opened this topic on on May 27, 2018 - 9 comments

Mike Thomson commented on May 27, 2018

I am evaluating php reporting solutions for use in my app. I need to produce traditional multi-page reports with headers, footers, groups and sub-totals. Each page must be A4 portrait or lanscspe and include page numbers. From what i have so far i will need the exports package. None of the examples cover multi-page traditional reports. Can someone enlighten me on this?

Mike

KoolReport commented on May 27, 2018

Hi Mike,

Welcome to KoolReport.

For your questions, Export package is able to deliver PDF file with header and footer. You can have auto page number as well. Here is example for the view of report

<html>
    <body style="margin: 1in">
        <header style='height:30px'>
            <span>MyReport</span>
        </header>

        ...
        ...

        <footer style='height:30px'>
            <span>Page {pageNum}/{numPages}</span>
        </footer>
    </body>
</html>

With above view, the PDF exported will have MyReport on header of each page. And you will have the footer like this Page 1/2.

Let us know if you need any further assistance.

Regards,

KoolPHP Inc

Mike Thomson commented on May 28, 2018

Thanks for the fast reply. I am imagining that as there is only page headers and footers on PDF output, that table headings will not be repeated on each page - is that correct? Also, am I right in thinking that it not possible to have report subtotals (based on a post I saw on forum)?

Not being able to trial the Export Package menas I can;t test this for myself.

KoolReport commented on May 28, 2018

Hi Mike,

For your questions:

  1. There is one page header and footer. The only content which can be changed page to page is the {pageNum}
  2. Currently the header of table is not repeated when going to new page. We are working on that.
  3. Could you please explain more about report subtotals? I have not fully understood your requirement, if possible please provide any image to illustrate.
  4. There is no trial but the Export package is back with 30-day money back so you may go ahead with purchase and you can test it fully. If it does not reach your expectation, just let us know, we will refund you fully.

Let me know if you need further information.

Mike Thomson commented on May 28, 2018
Sub totals Like in this mockup (in this case where sub total is based on booking number)

Booking 123
01/05/2018 Accommodation             150.00
                   Less: Commission            15.00
                   Less: Advertising Levy       5.00        130.00
Booking 140
05/05/2018 Accommodation              350.00
                    Less: Commission            35.00
                    Less: Advertising Levy      12.00       203.00 
Booking 170
12/05/2018 Accommodation               150.00
                    Less: Commission             15.00
                    Less: Advertising Levy        5.00        130.00
                                                                                ---------
TOTAL                                                                     463.00
KoolReport commented on May 28, 2018

Oh, you can do it. As I can imagine, for each booking, you have a row containing date, amount, commission and advertising_levy columns. The subtotal of each booking can be calculated = amount - commission - advertising_levy and all subtotal is sum up at the end. It is definitely possible. Just use the CalculatedColumn of KoolReport to build subtotal column. For data visualization, you may use our Table. If you want exactly the view like above, it is also possible. I can guide you if you want to.

Mike Thomson commented on May 28, 2018

Great thanks

Mike Thomson commented on May 28, 2018

Your support responsiveness is excellent.

An example on your web site showing sub headers and sub totals would be a great idea - as this is a very fundamental requirement for tabular based reporting. Currently there are no tabular demos which span more than a single page or show page layouts / page no’s for PDF output.

Any idea when repeating table (thread) headers might be available? Not having column headers on subsequent pages makes reports much less readable. It is an essential requirement for me. I currently do this with TCPDF library.

piyush chandak commented on Jan 14, 2020

can we send parameter to setup function and also from setup function to view part for dynamic and generic report creating ??

KoolReport commented on Jan 14, 2020

For sure you can do so. You can send the parameters to the report and report can be created dynamically and generate pdf dynamically. Please view this topic to see how to insert parameter to the report.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None