CereusReporting not load PDF document template

Announcements concerning Plugins for Cacti

Moderators: Moderators, Developers

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

CereusReporting not load PDF document template

#1 Post by backdoor » Fri Jul 10, 2015 5:30 am

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
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#2 Post by phalek » Sat Jul 18, 2015 10:16 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#3 Post by backdoor » Mon Jul 20, 2015 6:35 am

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
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#4 Post by phalek » Mon Jul 20, 2015 6:58 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#5 Post by backdoor » Mon Jul 20, 2015 7:06 am

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
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#6 Post by phalek » Mon Jul 20, 2015 7:36 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#7 Post by backdoor » Tue Jul 21, 2015 12:27 am

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
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#8 Post by phalek » Tue Jul 21, 2015 1:07 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#9 Post by backdoor » Tue Jul 21, 2015 1:10 am

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
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#10 Post by phalek » Tue Jul 21, 2015 1:21 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#11 Post by backdoor » Tue Jul 21, 2015 1:25 am

No report generate. If above error displayed.

User avatar
phalek
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#12 Post by phalek » Tue Jul 21, 2015 1:27 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#13 Post by backdoor » Tue Jul 21, 2015 1:42 am

Sorry, Below is my tree.

Image

User avatar
phalek
Cacti Guru User
Posts: 2725
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CereusReporting not load PDF document template

#14 Post by phalek » Tue Jul 21, 2015 2:20 am

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 : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

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

Re: CereusReporting not load PDF document template

#15 Post by backdoor » Tue Jul 21, 2015 2:21 am

Thx phalek, you are the best!!!

Post Reply