CodeIgniter Forums

Full Version: Can I TCPDF footer print the fields without departing from the MVC standard?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use Tcpdf to generate a report. I researched how to change the footer. I understood that it is only possible if I create a class inheriting the original class. So I created this class and the myfooter and myheader methods. But my footer needs to print names that are fields in a table. I do 4 select SQL and print the body of the report. But how do I make my footer print the fields without departing from the MVC standard?


I will try to explain further: I created a TCPDF extends class and saved this file in the LIB folder. This class has 2 methods (1 header and 1 footer). I need the footer to fetch names from an SQL query. Can I, from within this FOOTER method, call a model that returns these names?