carlosjpedro
Posts: 3
Joined: Mon Nov 12, 2012 3:16 pm
Location: Sweden

GUIDE: File Reports, export CSV to other systems.

Mon Nov 12, 2012 6:52 pm

Note: for an updated version of this and other articles, we recommend you to check our knowledge base here

GUIDE: File Reports, export CSV data to other systems.

This guide explain how to use File Reports. This feature can be used to export data from GpsGate Server to other systems, by the saving of CSV files in a share folder or a ftp server.

Another area of usage is to store all reports as PDF files in the file system for historical reference.

Install

Activate File Report in your application.

1. Login to SiteAdmin
2. Select application
3. Select _EditFileReportSchedule option in the Reporting plugin.
4. Save.

Or use the "Batch edit" feature to enable _EditFileReportSchedule in multiple applications at once.

Schedule report in application

1. In the VehicleTracker application, select Reports->Manage Reports in the menu.
2. Select one of the reports, in the list, either editing or opening report.
3. Set the parameters of the report, period, events and tags for which the report applys.
4. Set schedule of the report to "file save". And select when the File Reports should be generated, and a Tag of recipient users.

Note that you still must specify a Tag of recipients! If there are multiple users in the recipient Tag a report will be saved for each username.

When using "File Report" for export to a third party system, you typically want to create a dedicated export user for this.

Where the File Reports are saved

The File Reports will be saved in a file/folder strucuture like this:
[GpsGateServer root folder]\FileReports\App_[ApplicationID]\[Username]\[Name of Report]_[yyyyMMdd].[file extention]

Change path to where File Reports are saved

There is a NTFS file system feature called Junction:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx
You can use this to sync your files to another path for example to your Dropbox.

If you edit the path and run the following command it will "link" the FileReports folder into your dropbox folder.
mklink /J c:\your\dropbox\folder\for\filereports c:\GpsGateServer\FileReports

Carlos Pedro
GpsGate Developer

wintesla
Posts: 266
Joined: Wed Mar 16, 2011 3:47 am
Location: Belgium

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 4:58 pm

Hi support,

when selecting the tag for file save, i need to create a new user as recipient.
Where do i fill in the info to send file to our ftp server ? Is it set under 'email' or do i need to enter elsewhere ?
Also what do i fill in? A link to the ftp ?

thanks in advance.

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 5:05 pm

The File Report feature cannot deliver a file over FTP. It will only save the report to the local file system. What you can do is to install a FTP server on your GpsGate Server computer and then fetch the files over FTP.

You can for example use FileZilla FTP Server:
http://filezilla-project.org/download.php?type=server

Regards,
Johan

GpsGate Support

wintesla
Posts: 266
Joined: Wed Mar 16, 2011 3:47 am
Location: Belgium

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 5:36 pm

Hi Johan,

Can you tell me why do we need to select a tag for recipients then, since the report will only be saved on the local file system ?
I thought that the selection op recipient determined the place of saving?

thanks in advance

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 6:03 pm

The report is generated in the recipient user's context. A user can for example have different _ReadData rights, which gives access to different tags of vehicles data. More info here:
topic.asp?TOPIC_ID=15060

You can for example have two users ExportUserA and ExportUserB. ExportUserA has access to TagA, and ExportUserB has access to TagB. If you include both users in the recipient tag two reports will be generated. One for vehicles in TagA and one for vehicles in TagB.

Another case is if you have many users you want to archive reports for, just for the historical record. You include all users in the recipient tag and when the reports are saved, reports for each user will be saved.

I thought that the selection op recipient determined the place of saving?

Yes, it does. It determines which folder the report is saved in. Please test to see how it works.

Regards,
Johan

GpsGate Support

wintesla
Posts: 266
Joined: Wed Mar 16, 2011 3:47 am
Location: Belgium

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 6:52 pm

Hi Johan,

exportuser was created and put under a tag. user has driver role and all the rest was remained blank.
This tag was selected in the report.
When viewing the queue viewer, report was send (it said 'email send')and progress indicates 'delivered' at 16h30.

But we can not find any file under root file that is named 'filereports'

Can you tell me what we are doing wrong here ? do we need to give this user another role or something else ?

kind regards

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 8:14 pm

Can you tell me what we are doing wrong here ? do we need to give this user another role or something else ?

Try to add a user with more privileges to the recipient tag.

Regards,
Johan

GpsGate Support

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 8:37 pm

NOTE! We have temporarily removed this BETA version of Reporting until tomorrow when a fixed version is released. If you have updated to Reporting v3.1.0.3873 BETA, then emailed reports will stop working until next update tomorrow.

Regards,
Johan

GpsGate Support

wintesla
Posts: 266
Joined: Wed Mar 16, 2011 3:47 am
Location: Belgium

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 9:04 pm

Just for your information then:

User with admin rights isn't working either :-)

See you guys tomorrow .

Thanks for the replies

Best regards

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Wed Nov 14, 2012 9:19 pm

The report files are saved under C:\GpsGateServer\FileReports (or C:\inetpub\wwwroot\GpsGateServer\FileReports for older installations).

Check in the ErrorLog you find under C:\GpsGateServer\ErrorLog if you have any errors related to generating or saving the report.

Regards,
Johan

GpsGate Support

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Thu Nov 15, 2012 12:35 pm

New beta v3.1.0.3889 released which fixes the email report issue. Update from beta.gpsgate.com

Regards,
Johan

GpsGate Support

wintesla
Posts: 266
Joined: Wed Mar 16, 2011 3:47 am
Location: Belgium

RE: GUIDE: File Reports, export CSV to other systems.

Fri Nov 16, 2012 3:29 pm

Hi,

Installed 3.1.0.3889

Still no Filereports under C:\inetpub\wwwroot\GpsGateServer\.

Maybe because it is on mssql server (not mysqol)?

kind regards,

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Fri Nov 16, 2012 3:35 pm

Check in the ErrorLog you find under C:\GpsGateServer\ErrorLog if you have any errors related to generating or saving the report.

Regards,
Johan

GpsGate Support

wintesla
Posts: 266
Joined: Wed Mar 16, 2011 3:47 am
Location: Belgium

RE: GUIDE: File Reports, export CSV to other systems.

Fri Nov 16, 2012 9:10 pm

Hi Johan,

No errorlogs in NMEA, some in IIS:

2012-11-15 11:28:48.3012 | Error | 3 | GateFacade.SendCommand | System.Net.Sockets.SocketException | System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:30175
at GpsGate.Client.GpsGateClient.m_Connect(Object objState)
at GpsGate.Directory.Service.GateFacade.SendCommand(FRCMD cmd)
...

kind regards,

User avatar
johan
GpsGate
Posts: 15228
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: GUIDE: File Reports, export CSV to other systems.

Fri Nov 16, 2012 11:17 pm

Try to create the report again or save the report again, since there was some problems in the first beta.

Regards,
Johan

GpsGate Support

Return to “GpsGate for Developers”