Data Exports feature

No I believe it exists now, at least in 5.1.45 it does:

2 Likes

As a feature request, would be nice to be able to set the file type for the report.

If I set a filename, it of course follows the name I give. If I don’t, it wants to save as .txt, and I have to set to “all files” in the dialog then type filename with extension. What would be good is either the dialog gives choices (txt, csv, xml), or we can set the default type for the report.

Also, should disable/remove Save and Print buttons in Data Export section of reports, they serve no purpose (it prints or saves the actual page as seen on screen, with the report links - it doesn’t actually save/print the report).

1 Like

Wow, absolutely correct. I didn’t have that last Data Export link until I created an Export Template, but now I do… :smile:

1 Like

While talking about it I should mention two features.

  • You can use printer tags like {CALL:X} or {DATE:X} in file names.
  • If you type a printer name as file name it will just print that export as it seen on screen. That might be useful to send data to web services via url printer or send data to serial port with port printer.

I’m noting requests.

3 Likes

I’ve implemented this for 5.1.49 version.

1 Like

I’m trying to export daily sales totals by date to CSV, using the report template taken from Sales Report monthly with just a few modifications to suit my setup and support CSV output.

Here is the template:

Date,TicketSales,Discount,Total,Cash,Visa,Master,Amex,UnionPay
{REPORT TICKET DETAILS:
	T.Date,
	([T.TotalAmount]-[CA.Discount]-[T.Tax]).sum,
	CA.Discount.sum,
	T.TotalAmount.sum,
	PA.Cash.sum,
	PA.Visa.sum,
	PA.Master.sum,
	PA.Amex.sum,
	PA.UnionPay.sum
:(TS.Status=Paid)
:"{0}","{1}","{2}","{3}","{4}","{5}","{6}","{7}","{8}"}

It is just exporting the header tow and the data is all blank:

Any ideas? Have I got the syntax wrong?

Are you sure there is data for it to export? What does the preview show?

That syntax looks good to me.

Yes I have the identical report added as well as a normal report:

This was for the same period as I got the empty results in CSV. And any other period I also just get empty results.

The preview shows the same - header row but no data. As I think the preview is for the current work period I put through a few more transactions and confirmed they showed on other reports in preview mode. However the CSV one just shows header row only:

Mark seems like formatting you’ve applied confuses template parser. I’ve fixed that but for a quick solution you can try converting that format to a one liner.

1 Like

Yeah I confirm it works if I put the formatted part on one line.

I thought it ignores whitespace, because also others above were posting with formatting and I thought the parser would ignore it. I guess they just posted for readability.

it works but I think you added extra white space.

EDIT: Nevermind your right… odd.

You thought right. It will work correctly with whitespace and tab characters on next update. That was a specific issue for 5.1.53.

2 Likes

Hi - I am trying to create a data export for inventory… is this possible? If so could someone please show me the syntax… Or is there a list somewhere so I can figure it out myself… Thanks

HI @markjw add the line as i did at the bottom:
[Purchases by Supplier:1, 1,1,1]
{REPORT INVENTORY TRANSACTION DETAILS:
,T.AccountName
, T.ItemGroup
, T.Quantity
, T.TotalPrice.Sum
,
:
:{0},{1},{2},{3}}

Hi, Please help. I’ve read about exporting to .xls but still can get this report to be transfered in columns. Please help… I have followed the instructions but I still can`t.

[Sales:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1":2}

Thanks in advance!!!

See the last bit on the first line? :{0}:,
Add this to the other lines, this is what sets the output format and separator ie the comma and you export to csv and open in excel

Thanks! I did that and the format is better, just one thing if you dont mind, one number is still wrong as In the real report it shows as this…
Española 14 3,620.66
Tabla mixta 10 3,350.3

and in the report that I’m oppening in .xls, it shows as this:
Española 143 620.66
Tabla mixta 103 350.3

I asume is because of the comma, but I can’t that coma in the formula:
[Sales:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}

{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName=“$1”:{0}:,}
{REPORT ORDER DETAILS:’ '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName=“$1”:2:{0}:,}

thanks a lot!

So it shows the number split into two columns where the comma would be in the report?

Exactly it should be like this:
Española 14 3,620.66
Tabla mixta 10 3,350.3

As the last number is currency $$, it has a comma and .xls is taking it as a space.

So .xls is showing me the result as:
Española 143 620.66
Tabla mixta 103 350.3

How can I fix it?

So is it a space or a new cell?
Sure its not your regional settings in windows?
If its in a single cell either way you should be able to define formatting in excel