Reports

thread: 18 messages  |  last: about 3 years ago  |  started: thursday, october 12, 2006, 11:39 am pdt


#1  |  Shannon Pekary (East Palo Alto, CA) United States of America Qcodo Core Contributor
Thursday, October 12, 2006, 11:39 AM PDT

I would love to hear what people are using for creating reports from their databases. I have a situation where I need to create a LOT of paperwork to pass out to people. Not all people are online. My specific application is a sports league, where I need to print a roster, schedule, and other information for each coach, but print multiple copies of each so that each coach can hand one to each player. I need it to reprint the same page the exact number of times for each player on each team.

I want to do this all in one step, run the report, then print and have it all just print in one batch. I tried creating panels for each report, but when I try to have the panel render multiple times, qcodo complains that a control is already rendered.

It occurs to me that what I really want is a report printing engine. The engine should probably NOT be built on html, though it could be. CSS isn't too bad, now that it has page break commands. However, for consistent printing, I probably want a pdf file. There is something called dom2pdf, but the home site seems to be down. Other solutions are built on proprietary libraries that cost up to $1000 a license.

Mike, have you given any thought to bundling report printing?

What do other folks use?

Can we make control->Rendered writable so that we can multiply render a control if we really want to?

Shannon

#2  |  brynjar (M) Iceland
Thursday, October 12, 2006, 1:42 PM PDT

I have been using the FPDF (http://www.fpdf.org) library to create PDF documents in my project. With this library it is very easy to set up tables etc. Of course this is no report engine, it is just a simple library to build PDF documents.

Brynjar

#3  |  Christophe Damour (Saint Laurent des Combes) France
Thursday, October 12, 2006, 2:27 PM PDT

Hi,

I have successfully used fpdf (<http://www.fpdf.org>), and tcpdf (<http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf>) when utf8 is required.

I had a look at dompdf (<http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf>) but did not test it so far...

Christophe

#4  |  Stockton (Buenos Aires, Argentina)
Thursday, October 12, 2006, 6:00 PM PDT

i tried a little dompdf and is great
check this post
http://www.qcodo.com/forums/topic.php/1042/1

#5  |  Shannon Pekary (East Palo Alto, CA) United States of America Qcodo Core Contributor
Tuesday, December 26, 2006, 2:49 PM PST

I ended up using html2ps found here:

http://www.tufat.com/s_html2ps_html2pdf.htm

It appears to be built on top of fpdf, includes the css support that dompdf has, but the other biggie is that it appears to be actively supported, whereas it seems that dompdf is not.

I found it easy to install and use, and quite good. The home page says that it requires GhostScript, but when you dig a bit, that is not true. It really only needs GD2 with JPEG and TTF support built in to your PHP, which is fairly common in stock installs and easy to add.

#6  |  Jocelyn Bernier (Montréal, Canada) Canada
Saturday, February 3, 2007, 6:03 PM PST

I use this great report software for PHP. Very easy to use with GUI designer ;-)


http://www.agata.org.br/

#7  |  Felix Guerrero (Merida, Venezuela) Venezuela
Sunday, August 12, 2007, 7:53 PM PDT

Hi.

I use phpreports (http://phpreports.sourceforge.net), it has a XML engine that process XML templates to generate HTML reports.

I hope that helps.

#8  |  marcelo mprizmic Argentina
Monday, August 13, 2007, 5:41 AM PDT

I used phpreports

You can see an integration at

http://www.qcodo.com/forums/topic.php/1992/1//?strSearch=integration


Marcelo

#9  |  Gelmar (Saint Louis, MO) United States of America
Thursday, November 29, 2007, 9:20 AM PST

I just stumnled over this link the other day, while searching for a PDF generation tool...
http://www.ros.co.nz/pdf/
it seems pretty amazing and plays well with QCodo....

Thought I'd share and add on the already existing list...

Thanks,

G.

#10  |  Hunter Jensen (San Diego, CA) United States of America Qcodo Core Contributor
Wednesday, August 6, 2008, 12:34 PM PDT

I just struggled for a while before I realized that I had a QAjaxAction trying to output the PDF. It's  important that the button click or whatever triggers the PDF generation is a ServerAction. Hopefully this post will save someone some time. Here's my code using TCPDF to output a PDF of barcode labels.

protected function btnPrint_Click() {
            
        $this->RenderBegin(false);
            
    $this->lstLabelStock->Warning = "";
    $this->dlgPrintLabels->HideDialogBox();
        // Bar Code Label Generation
    $this->intCurrentBarCodeLabel = 0;
            
    include_once('../includes/php/tcpdf/config/lang/eng.php');
        include_once('../includes/php/tcpdf/tcpdf.php');
        
        $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
        // set document information
        $pdf->SetCreator("Tracmor");
        $pdf->SetAuthor("Tracmor");
        
        $pdf->setPrintHeader(false);
        $pdf->setPrintFooter(false);
        
        // set margins
        $pdf->SetMargins(10, 5, 10);
        
        // set auto page breaks
        $pdf->SetAutoPageBreak(false);
        
        // set some language-dependent strings
        $pdf->setLanguageArray($l); 
        
        // initialize document
        $pdf->AliasNbPages();
        
        while ($this->intCurrentBarCodeLabel < count($this->strBarCodeArray)) {
          // add a page
          $pdf->AddPage();
          // Create HTML content
          $htmlcontent = $this->CreateTableByBarCodeArray();
          // output the HTML content
          $pdf->writeHTML($htmlcontent);
        }
        // Close and save PDF document
        // Clean the output buffer
        ob_end_clean();
        $pdf->Output("../includes/php/tcpdf/images/tmp/result.pdf", "I");

        // Make sure any Javascript called with databind() doesn't get output
        QApplication::$JavaScriptArray = array();
    QApplication::$JavaScriptArrayHighPriority = array();
        $this->RenderCsvEnd(false);
    exit();
}
.bc


Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.