Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.4.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Export computers with choosen columns

I've upgraded OCS NG to newest 2.2 version and now I have the next problem: I can't export All computers to csv with information from choosen columns. It saves the csv file with full computers' information.
asked in OCS Inventory NG server for Unix by (120 points)

3 Answers

0 votes
Hi,

At the moment this functionnality is not implemented with the new UI.

You should post a request at this address if you want this functionnality to be integrated.

https://github.com/OCSInventory-NG/OCSInventory-ocsreports

Regards,

Gilles Dubois.
answered by (2.9k points)
+1 vote
  • Locate file ms_csv.php
  • On Linux, use the command 'locate ms_csv.php'
  • Edit the file, looking for this block of code:

if ($_SESSION['OCS']['visible_col'][$protectedGet['tablename']][$name]{1} == ".") {
                $lbl = substr(strrchr($_SESSION['OCS']['visible_col'][$protectedGet['tablename']][$name], "."), 1);
            } else {
                $lbl = $_SESSION['OCS']['visible_col'][$protectedGet['tablename']][$name];
            }

  • Remove the block and put in place this single line:

$lbl = $_SESSION['OCS']['visible_col'][$protectedGet['tablename']][$name];

  • It is a matter of an IF STATEMENT that is put in place to fix or handle something that should not affect anyone under normal circumstances, but it is their to bug your life :D :D (or maybe a dubious attempt to imitate others like OrangeHRM, who  bargain users over documentation!!)
answered by (160 points)
0 votes
The bug is present in 2.4.1. As far as I remember it was working in past versions. Thank you MK4L for the fix.
answered by (680 points)
 
Powered by Question2Answer
...