You are not logged in.
Pages: 1
Hello,
i am trying to build my own report.
Once it was working good but now it produces massive problems.
I changed my reports because i had a problem with multiple softwareversions.
So i tried to find a workaround but it doesn't work.
Maybe someone here can help me
Here is what i've got so far:
<code>
$query = "SELECT glpi_software.name AS Software,
glpi_softwareversions.name AS Version,
glpi_softwarelicenses.name AS Lizenz,
glpi_softwarelicenses.number AS Anzahl,
glpi_dropdown_licensetypes.name AS Typ,
glpi_infocoms.value AS Kosten,
FORMAT((glpi_infocoms.value * glpi_softwarelicenses.number), 2) AS 'Einkaufskosten Gesamt',
glpi_infocoms.buy_date AS Kaufdatum,
glpi_softwarelicenses.expire AS Ablaufdatum,
DATEDIFF(glpi_softwarelicenses.expire, CURDATE()) AS UebrigeTage,
glpi_dropdown_budget.name
from glpi_software
INNER JOIN glpi_softwareversions ON glpi_software.ID = glpi_softwareversions.sID
INNER JOIN glpi_softwarelicenses ON glpi_softwareversions.sID = glpi_softwarelicenses.sID
INNER JOIN glpi_dropdown_licensetypes ON glpi_softwarelicenses.type = glpi_dropdown_licensetypes.ID
INNER JOIN glpi_infocoms ON glpi_softwarelicenses.ID = glpi_infocoms.FK_device
INNER JOIN glpi_dropdown_budget ON glpi_infocoms.budget = glpi_dropdown_budget.ID",
$query .= "WHERE glpi_softwareversions.name = glpi_softwarelicenses.name",
$query .= "WHERE glpi_softwareversions.name != Office",
</code>
But if i start the report it only displays these error messages:
<code>
PHP ERROR: Invalid argument supplied for foreach() in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 237
PHP ERROR: Undefined variable: colsname in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Invalid argument supplied for foreach() in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Undefined variable: colsname in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Invalid argument supplied for foreach() in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Undefined variable: colsname in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Invalid argument supplied for foreach() in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Undefined variable: colsname in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
PHP ERROR: Invalid argument supplied for foreach() in C:\xampp\xampp\htdocs\glpi\plugins\reports\inc\plugin_reports.autoreport.class.php at line 268
</code>
How can i make this work?
Im from Germany and my english isn't the best so if anyone who speaks german is here please help me! I can describe my problem better in german
Last edited by buhralex (2010-02-11 14:50:43)
Offline
Version of GLPI ?
In your query, you can't have 2 WHERE
WHERE glpi_softwareversions.name = glpi_softwarelicenses.name",
AND glpi_softwareversions.name != Office";
and the end of a SQL query is a ;
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
Pages: 1