You are not logged in.
Pages: 1
Good morning.
I want to create my own report for it i using information from website (https://forge.glpi-project.org/projects … eateReport).
My steps was next:
Made simple request for testing -> checked in MySQL -> created report
But i got error:
PHP Fatal error: Class 'PluginRepportsColumn' not found in /var/www/addon/glpi/plugins/reports/report/malti/malti.php on line 201, referer: http://dc-inventory/glpi/plugins/reports/report/malti/malti.php
Version GLPI 0.90.5, plugin report v. 1.9.1
<?php
$USEDBREPLICATE = 1;
$DBCONNECTION_REQUIRED = 0;
include ("../../../../inc/includes.php");
$report = new PluginReportsAutoReport(__('firstreport_title', 'reports'));
$report->setColumns(array(new PluginReportsColumn('name', __('name'))));
$query = "SELECT `glpi_computers`.`name`
FROM `glpi_computers`" .
$report->setSqlRequest($query);
$report->execute();
Can you give tip for fixing error?
Last edited by malti (2016-12-13 09:05:01)
Offline
Do you have the 'Reports' plugin installed?
Last edited by chris.anderson3 (2016-12-13 16:03:01)
GLPI 90.5 XAMPP- 1.8.2 Apache/2.4.10 (Win32) OpenSSL/1.0.1h PHP/5.4.31
Offline
what strange is :
in error message
PluginRepportsColumn
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Online
Do you have the 'Reports' plugin installed?
hahaha ... Sure
Offline
what strange is :
in error messagePluginRepportsColumn
Thanks. All work!
Offline
how can i change direction columns?
+---------+--------------------
|header1+ test |
---------------------------------
|header2+ test |
---------------------------------
Offline
Good morning.
made report, go web-interface for checking and get message "Item not found". what does this message mean?
<?php
$USEDBREPLICATE = 1;
$DBCONNECTION_REQUIRED = 1;
include ("../../../../inc/includes.php");
$report = new PluginReportsAutoReport(__('malti_report_title', 'reports'));
$report->setColumns(array(new PluginReportsColumn('id', $LANG["common"][0]),
new PluginReportsColumn('name', $LANG["common"][35], 'PC'),
new PluginReportsColumn('realname', $LANG["common"][18], 'User'),
new PluginReportsColumn('completename', $LANG["common"][43]),
new PluginReportsColumn('name', $LANG["common"][48])));
$query = "SELECT `glpi_computers`.`id`,
`glpi_computers`.`name` AS PC,
`glpi_users`.`id`,
`glpi_users`.`realname`,
`glpi_locations.completename`.`name` AS place,
`glpi_operatingsystems`.`name` AS OS
FROM `glpi_computers`
LEFT JOIN `glpi_users` ON (`glpi_conputers`.`users_id` = `glpi_users`.`id`)
LEFT JOIN `glpi_locations` ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`)
LEFT JOIN `glpi_operatingsystems` ON (`glpi_computers`.`operatingsystems_id` = `glpi_operatingsystems`.`id`)".
getEntitiesRestrictRequest("WHERE", "glpi_computers")."
ORDER BY `glpi_computers`.`name`";
$report->setGroupBy(array('realname'));
$report->setSqlRequest($query);
$report->execute();
Offline
colums are not correctly set
new PluginReportsColumn('name', $LANG["common"][35], 'PC')
should be
new PluginReportsColumn('PC', $LANG["common"][35], 'computer')
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Online
Change how you say, but get message "Item not found". Try don't use "AS" and get "Item not found"
$USEDBREPLICATE = 1;
$DBCONNECTION_REQUIRED = 1;
include ("../../../../inc/includes.php");
$report = new PluginReportsAutoReport(__('malti_report_title', 'reports'));
$report->setColumns(array(new PluginReportsColumn('id', $LANG["common"][0]),
new PluginReportsColumn('PC', $LANG["common"][35], 'computer'),
new PluginReportsColumn('User', $LANG["setup"][18], 'realname'),
new PluginReportsColumn('Plase', $LANG["common"][43], 'completename'),
new PluginReportsColumn('OS', $LANG["common"][48], 'operatingsystems')));
$query = "SELECT `glpi_computers`.`id`,
`glpi_computers`.`name` AS PC,
`glpi_users`.`realname` AS User,
`glpi_locations`.`completename` AS Place,
`glpi_operatingsystems`.`name` AS OS
FROM `glpi_computers`
LEFT JOIN `glpi_users` ON (`glpi_conputers`.`users_id` = `glpi_users`.`id`)
LEFT JOIN `glpi_locations` ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`)
LEFT JOIN `glpi_operatingsystems` ON (`glpi_computers`.`operatingsystems_id` = `glpi_operatingsystems`.`id`)".
getEntitiesRestrictRequest("WHERE", "glpi_computers")."
ORDER BY `glpi_computers`.`name`, `glpi_users`.`name`";
$report->setGroupBy(array('realname'));
$report->setSqlRequest($query);
$report->execute();
Last edited by malti (2016-12-20 13:06:57)
Offline
JOIN `glpi_users` ON (`glpi_conputers`
coMputer
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Online
JOIN `glpi_users` ON (`glpi_conputers`
coMputer
Thank you so much!....
Offline
new PluginReportsColumn('Plase'
`glpi_locations`.`completename` AS Place,
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Online
Can i made that report looks similar like on picture?
https://www.dropbox.com/s/59vlyo2nr5yrs … 2.png?dl=0
Last edited by malti (2016-12-20 16:35:31)
Offline
If create a class in folder /glpi/inc/ can change visualisation report?
For example ../glpi/inc/ownreport.class.php instead ../glpi/inc/toolbox.class.php
include ("../../../../inc/ownreport.class.php");
Offline
If you want to change visualisation of your report, you can create your own visualisation instead of using mechanism of report plugin
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Could you say where i can found information about creating own visualization? I tried create file with style in glpi/inc/malti_class.php, but it didn't help.
Offline
You create your report as you doesn't use Report plugin (define the column, define the display tab, list...)
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
yllen.Do you mean to use Criteria? https://forge.glpi-project.org/projects … i/Criteria
Could you say how connect glpi_computers with glpi_deviceprocessors. Want to add this information in report? Found only is_recursive for combining it.
P.S. sorry for my english.
Offline
in you database, glpi_items_deviceprocessors, itemtype must be 'Computer' and items_id = glpi_computers.id and deviceprocessors_id = glpi_deviceprocessors.id
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Hello.
Try this request, but get error (ERROR 1054 (42S22): Unknown column 'glpi_items_deviceprocessors.deviceprocessors_id' in 'on clause'). Could you help fix error?
SELECT glpi_computers.name ,
glpi_computers.contact ,
glpi_locations.completename ,
glpi_operatingsystems.name ,
glpi_deviceprocessors.designation,
glpi_devicememories.size_default
FROM glpi_items_deviceprocessors, glpi_items_devicememories
LEFT JOIN glpi_computers ON (glpi_items_deviceprocessors.items_id = glpi_computers.id)
LEFT JOIN glpi_locations ON (glpi_computers.locations_id = glpi_locations.id)
LEFT JOIN glpi_operatingsystems ON (glpi_computers.operatingsystems_id = glpi_operatingsystems.id)
LEFT JOIN glpi_deviceprocessors ON (glpi_items_deviceprocessors.deviceprocessors_id = glpi_deviceprocessors.id)
LEFT JOIN glpi_devicememories ON (glpi_items_devicememories.devicememories_id = glpi_devicememories.id)
Offline
Pages: 1