Frequently Asked Question

How to configure the FTP Export in Need4Viz solution
Last Updated 2 years ago

Symptom

  • Configure Need4Viz services to enable FTP Export
  • Configure a Need4Viz component to be exported in FTP destination
  • FTP export is only possible in a PASSIVE mode

Environment

  • Windows Server
  • Need4Viz : all versions

Resolution

To configure Need4Viz services to enable FTP Export :

  1. Open the file ~Need4Viz_folder_installation/nodejs/node_modules/custom_element/ce_libs/config.js (make a backup copy before any update of this file)
  2. Set the export_FTP parameter to true (to enable the export FTP menu in the charts settings)
  3. Go to the //FTP Config section of this file
  4. Fill the FTPMode parameter : FTP or SFTP
  5. Fill the FTPHost parameter : the FTP server name
  6. Fill the FTPPort parameter : the FTP port, by default, set to 21
  7. Fill the FTPUser parameter : the user authorized to access the FTP destination
  8. Fill the FTPPass parameter : the password of the user authorized to access the FTP destination
  9. Fill the FTPBaseDir parameter : the root path set on the FTP server for the user. This parameter have to end with a '/'. If there is no specific root path defined, set '/'.
  10. Save the config.js file
  11. Restart the Need4Viz services

To configure a Need4Viz component to be exported in FTP destination (FTP Export is configured for Need4Viz services):

  1. In a Webi report, configure a new Need4Viz chart
  2. Validate the chart
  3. Open the Format Custom Element window of the chart and go to the Export FTP section
  4. Tick the Automatically export the chart (to enable the export for this chart)
  5. Fill the Path destination : path of the folder, under the FTPBaseDir folder on the FTP server. If the folder does not exist, it is created. Do not start with a '/' (for example : folder1/folder2) 
  6. Fill the Name of the generated target HTML file : name of the exported html file in the destination folder (for example : myfile.html)
  7. Validate the settings
  8. Check in the FTP folder, the file is created

Possible issue

In case of file not created in the destination folder, check :

  1. FTP server is set as Passive mode
  2. The Need4Viz server can access to the FTP server (on the port specified)
  3. The FTPUser/FTPPass are set correctly and the user has the right to create a folder/file in the FTPBaseDir folder on the FTP server.
  4. If Need4Viz is installed in a root folder containing a space character (ex. "Program files"), you need to create a specific working directory without space or special char (Ex.  C:/Need4Viz/data/ce_works) then in the config.js file, replace the line var WorkingPath = LocalCEPath+'/'+WorkingFolder+'/'; with var WorkingPath ='C:/Need4viz/data/'+WorkingFolder+'/'; and restart N4V services ("pm2 start all" in a PowerShell window).
  5. In the config.js file of N4V, check the LocalCEPath contains uniquely '/' directory separator (and no '\\') because WorkingPath variable mustn't mix '/' and '\\' characters.

To get more informations about the issue :

  1. Enable Debug mode in Need4Viz config.js file (set LogDebug parameter to true)
  2. Restart Need4Viz services
  3. Test again an FTP Export of your chart
  4. Open the~Need4Viz_folder_installation/log
  5. check the n4v_xxx_out.log and n4v_xxx_err.log file (where xxx is the service that should render the charts)

Please Wait!

Please wait... it will take a second!