Page 1 of 3

Usage of CSweb

Posted: May 19th, 2017, 9:01 pm
by ekinge
Dear Users,

I have successfully installed CSweb on an online server and can log in as admin. I can also sync file to the server via FTP to the files directory on the server. Now my question is I don't see any cases in the admin portal of the CSweb although I have some data in the files directory. How do I sync so I see the cases or how do I use the CSweb server so I get the cases all together so I can download. Please help ASAP.

Thank you all.

Re: Usage of CSweb

Posted: May 19th, 2017, 11:21 pm
by htuser
Hi Ekinge,
I don't think ftp sync is linked to the Csweb server. So you can't see ftp synchronized case on the Csweb. FTP sync store cases in csdb database and Csweb store them in Mysql. To sync using Csweb, you must:
1.- upload your dcf file to Csweb (add dictionary),
2.- Using Csweb as a parameter for syncdata function. Easily, you can use built in synchronization in the Cspro designer.

If this insufficient, i can send screen and more explanation to you.
Best Regards,

Re: Usage of CSweb

Posted: May 20th, 2017, 2:17 pm
by sah
You can use the Data Viewer tool to download data from a server used for data synchronization. I have tried this and it is awesome.

Re: Usage of CSweb

Posted: May 29th, 2017, 3:23 pm
by MrTaco
hi htuser

please send the screens

thanks in advance

Re: Usage of CSweb

Posted: May 29th, 2017, 3:43 pm
by sah
You can check the CSweb documentation and also use the script below as well:

string Server = "https://www.myserver.org/api";

// connect to the CSWeb server
if syncconnect(CSWeb,Server) =1 then

// get the latest versions of the application files from the CSWeb server
syncfile(GET,"/MyApp/MyApp.pff");
syncfile(GET,"/MyApp/MyApp.pen");

// send the latest cases to the CSWeb server
syncdata(PUT,SURVEY_DICT);

syncdisconnect();

endif;

Re: Usage of CSweb

Posted: June 16th, 2017, 6:44 am
by arkagwa
I have problem with setting up csweb server with WAMPSERVER
see attached file with this error
Failed to connect to database. SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_time'

Re: Usage of CSweb

Posted: June 16th, 2017, 7:42 am
by josh
The problem you are facing is most likely due to a strict mode setting in MySQL that is not allowing default dates set to zero.

Here is a link that shows how to enable MySQL to allow zero date value insertions: http://stackoverflow.com/questions/3637 ... r-datetime

If you are using MySQL version 5.7 change your setting in MySQL.ini from:

;sql-mode= "STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"

To:

;sql-mode="ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"

After making this change to MySQL restart your services and run CSWeb setting again to see if you are still having issues.

Re: Usage of CSweb

Posted: June 17th, 2017, 5:20 am
by arkagwa
Dear Josh

I have been able to setup csweb successful in local host C/wamp64/csweb and i am able to access the server via http://localhost/csweb/ui/dashboard/

The problem is should i put the folder "UG FORM" which has .pff and pen files. The connection test to the server was successful but when i sync i get nothing in my server, i don't see cases. I have Data fie with 5 cases in my drive where i do data entry.

I have attached the screenshots

Re: Usage of CSweb

Posted: June 18th, 2017, 8:49 pm
by josh
The pen and the pff files go in the directory csweb/files directory on the server. Since in the sync options dialog you have /apps/UG FORM then you should put them in the folder csweb/files/apps/UG FORM (or you can edit the directory in the sync options dialog to match the directory you put them in inside csweb/files).

To see why the cases are not being synced to the server you should look at the sync.log file on the device that you do data entry on. On Android it will be in the csentry directory. On Windows it is in C:\users\<your username>\appdata\Roaming\CSPro.

Re: Usage of CSweb

Posted: June 19th, 2017, 7:11 am
by arkagwa
I have set path in my PC-CSPro 7 data entry form as /UG FORM and i have uploaded the contents of UG folder in directory C/wamp64/www/csweb/files/apps/UG FORM. I have 4 cases in cspro entry form stored in local drive (another driver not C). I have tested the connection working but still i don't see any Database file after sync

19/05/2017 20:47:51.957 INFO: Connect to server http://www.myserver.com/api using saved credentials
19/05/2017 20:47:56.871 INFO: Canceled connection
19/05/2017 20:48:07.666 INFO: Connect to Dropbox
19/05/2017 20:48:07.666 INFO: Open/create C:\Users\ANDREW KAGWA\AppData\Roaming\CSPro\Dropbox.db in read/write mode.
19/05/2017 20:48:07.744 INFO: Create download table.
19/05/2017 20:51:42.199 INFO: Canceled connection
16/06/2017 21:02:26.999 INFO: Connect to server http://www.myserver.com/api using saved credentials
16/06/2017 21:02:51.569 ERROR: Error connecting to server: Could not resolve host: www.myserver.com
17/06/2017 10:05:47.510 INFO: Connect to server http://localhost/csweb/api using saved credentials
17/06/2017 10:06:52.641 INFO: Server API version: 1
17/06/2017 10:06:52.641 INFO: Connection successful. Server id: http://localhost/csweb/api/
17/06/2017 10:06:52.641 INFO: Disconnecting from server
17/06/2017 12:59:24.195 INFO: Connect to server http://localhost/csweb/api using saved credentials
17/06/2017 12:59:28.876 INFO: Canceled connection
19/06/2017 13:53:05.364 INFO: Connect to server http://localhost/csweb/api using saved credentials
19/06/2017 13:53:26.754 INFO: Server API version: 1
19/06/2017 13:53:26.754 INFO: Connection successful. Server id: http://localhost/csweb/api/
19/06/2017 13:53:26.754 INFO: Disconnecting from server