SambaPOS CSV exporter


I’m looking for somebody to develop a standalone export tool to allow me to export certain data / reports from SambaPOS v4 into CSV format.

The tool should be a windows app and work with SQL Server Express 2014. We should have a way to store reports (either via SQL Views or Stored procedures, or .sql files). Upon loading the app, the user would be able to select a saved report, select a date range (selectable from date pickers, and also past work periods (by querying work period table) - similar to selections available in reports view in SambaPOS. Then select the location for the CSV file to be exported to and hit Run.

Configuration of connection, etc., can be by an ini file or equivalent. Must not require any further dependencies to run other than those needed for SambaPOS v4.

As an added bonus, would also be good to be able to select all options above from command line as well as from the GUI.

NOTE: The app is not needed for creating the reports, which would be done either by SQL views, stored procedures or .sql files ourselves. It is just a connected GUI I need to allow the end user to run the reports.

I believe this is a pretty straightforward task, just I’m not a windows app developer else I could do it myself! :smile:

Those interested, please PM me estimated cost / time to complete this. Alternatively, if you feel it maybe done as an open source project if you like, as I believe it could be useful for the community too…

Any comments please feel free to ask below. Thanks :smile:

CSV format is required?

Yeah. SambaPOS default CSV builder export is not customisable, and as far as I know there is no way I can use Custom Reports module to export CSV.

So I need to have ability to have custom reports and also export them as CSV. I’ve been able to do it using SQL Server Express 2014 already, using the SQLCMD.exe tool and a few tweaks of the output both via cmd and an sql script, e.g.

SQLCMD.EXE -S . -d SambaPOS4 -E -s, -W -i d:\Temp\SambaCustomers.sql | findstr /V /C:"-" /B > d:\Temp\Customers.csv

(there is a useful guide here on how to do that)

But it’s not very user friendly and repeatable for a non-technical user. Hence why I am looking to have someone build a simple windows app to allow basic selection of work period / date range, etc.

Thought it might be best to post something here as hopefully some developers read this who have some knowledge of SambaPOS, rather than if I post on or elance and just get a whole load of irrelevant responses!

You can create batch file to execute that SQL and use an action to launch it. This can be set to fire whenever you want like on work period end or via a command button. Additionally if CSV is not required you can use save report to file action.

With version 5 we have even more powerful tools to automate this.

Yes I know, however there is no way in SambaPOS I can see where I can execute the SQL to use a custom date range, for example a previous work period, or specific dates. If there is please let me know! The purpose of the app is purely to allow the selection of work period or custom date range then run an existing report stored on SQL Server.

With v5 you can do this. It’s not an easy setup but it can be done and would be highly customizable.

Can you point me in the right direction where I can do this in v5 so I can take a look?

Good for future, only issue is I need this soon and not sure when v5 will be released, don’t want to use the beta version in production.

Start by looking at the features compilation for v5. But you would want to focus on the powerful new jscript capability.

I have used it in production since i think version 20 or so… @QMcKay has used it in production for a while as well so have countless other beta members. It is safe to use it in production. As new features are added you may want to test them in a test environment first but the current version is more stable than v4 honestly.

1 Like

Sorry for hijacking your ad. I just know from experience that the number of actual developers willing to do this job are almost zero right now because SambaPOS is still relatively small. I think that may change in near future if community really helps push it.

I wanted to show you that it can be possible without waiting to hire someone.

1 Like

Ok I will look into v5. I had been holding off really because of it’s beta status. My main issue though is because I’m installing for clients, not myself so will need to test all the customisations we have first in detail.

Also wasn’t 100% sure being it a private beta that it would be exactly correct to use it for a client, so was holding off until full release.

I agree with your comments I’d rather not hire someone and rather use the powerful functionality of SambaPOS, but this feature I’ve been hearing a lot about from a few clients and wanted to have something more user friendly for them.

Oh I did get a couple PMs though from some developers. Will look at all my options and decide, thanks for your advice @Jesse. :smiley:

1 Like