CereusReporting not load PDF document template

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

CereusReporting not load PDF document template

Post by backdoor »

Hi Folks,

I have a problem and need your help. I can create basic pdf report as in below picture.

Image

But, when I try create predefine report with header and footer I cannot see report in list of report on CereusReporting tab as in picture below.

Image

Here are my settings for my predefine report.

Image

Image

I also need to create report like in this link http://blog.network-outsourcing.de/wp-c ... Report.pdf that have a report cover. How can I create like this? Because I not see any settings that I can add a cover page.

Thanks in advance.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

Hi backdoor,

Sorry for not seeing this earlier.

Please use the "multi-report" for reports type and upgrade to 2.80.81 from here: http://blog.network-outsourcing.de/prod ... downloads/
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

Hi phalek,

Thank you for your reply. After update to version 2.80.81, I'm still cannot load PDF template. Do you have any suggestion?

Image

Image

Image
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

Got it,

The filename is wrong. Instead of

Code: Select all

test_P-A4.pdf
it should be

Code: Select all

test-P-A4.pdf
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

Hi phalek,

Thanks for your prompt reply. Now I chnage report name to your report template as in my last post. I can see your document template when I press preview report on top of add report menu. But, When I try to generrate report from graph view it not load document template as display in preview report.

May I missiong some instructions, please suggest.

:D

Below are picture from preview report and when generate from graph view.

Image

Image
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

Graph view uses the templates defined for each tree.

you need to add 2 lines of code to the tree.php file (at around line 89) to enable this feature:

Code: Select all

/* --------------------------
    The Save Function
   -------------------------- */
function form_save() {

        /* clear graph tree cache on save - affects current user only, other users should see changes in <5 minutes */
        if (isset($_SESSION['dhtml_tree'])) {
                unset($_SESSION['dhtml_tree']);
        }

        if (isset($_POST["save_component_tree"])) {
                $save["id"] = $_POST["id"];
                $save["name"] = form_input_validate($_POST["name"], "name", "", false, 3);
                $save["sort_type"] = form_input_validate($_POST["sort_type"], "sort_type", "", true, 3);

          /* CereusReporting START */
                $save["CereusReporting_cover_page"] =form_input_validate($_POST["CereusReporting_cover_page"], "CereusReporting_cover_page", "", true, 3);
                $save["CereusReporting_cover_logo"] = form_input_validate($_POST["CereusReporting_cover_logo"], "CereusReporting_cover_logo", "", true, 3);
              /* CereusReporting END*/

                if (!is_error_message()) {
                        $tree_id = sql_save($save, "graph_tree");

                        if ($tree_id) {
                                raise_message(1);
Then go to the Graph Trees in the console and select the templates you want to use.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

Hi phalek,

Thanks for you help!!! Now, I can create report with PDF template in tree view.

Another one question, Is possible to add PDF cover page when create report from graph view?
Last edited by backdoor on Tue Jul 21, 2015 1:09 am, edited 2 times in total.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

Unfortunately not. That feature is only implemented for the scheduled reports.

Btw, you can generate these by removing the "Plugin -> CereusReporting -> View Archive" realm permission from your user. You can then use the "cereus" tab to generate the reports you have defined so you do not need to schedule these.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

When I create new graph tree and try to create report this error message is appear
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: parameter was not defined' in /var/www/html/plugins/CereusReporting/functions.php:538 Stack trace: #0 /var/www/html/plugins/CereusReporting/functions.php(538): PDOStatement->execute() #1 /var/www/html/plugins/CereusReporting/createPDFReport.php(246): doLeafGraphs() #2 {main} thrown in /var/www/html/plugins/CereusReporting/functions.php on line 538
How to fixed it?

Thanks
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

How does your new graph tree look like ? Does it contain any sub-headers or hosts yet ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

No report generate. If above error displayed.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

That's not an answer to my question:

How does your new graph tree look like ? Does it contain any sub-headers or hosts yet ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

Sorry, Below is my tree.

Image
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

Post by phalek »

This may not work ( graphs on the top tree. ) try adding a sub-header first and put graphs on there.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
backdoor
Posts: 10
Joined: Thu Jul 02, 2015 5:44 am

Re: CereusReporting not load PDF document template

Post by backdoor »

Thx phalek, you are the best!!!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests