Custom Report Module - How to Add Payment Type & Department

Thank you for your help JTRTech, appreciate it!

here is the report using Report Tags in v5… it might work in v4 im not sure.

[Sales by Ticket & Department:1, 1, 1,1,1,1,1,2]
>Ticket No|Date|Time|Table|Total Amount|Cash Amount|Credit Amount|Department
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Tables,T.TotalAmount,PA.Cash,PA.Credit Card,T.Department:(TS.Status=Paid)}

EDIT: It appears to work just fine in v4

1 Like

Wow that is perfect,but it doesn’t work for version 4.

I will upgrade in around 2 weeks to version 5. I have to figure out how to do in version 4 by tomorrow morning and then later I can use this code to produce the same result.

Normally I can figure these things out really easily but this time I got stuck so I had to come onto the forum as my last resort. I would appreciate any suggestions, thanks

This screenshot is it in v4. It works just fine.

1 Like

2 Likes

Oh it worked!! Thank you sooo much.

I was entering it into the script section but it worked by just putting it directly into the table syntax

Not sure what you mean by Script syntax and table syntax. You were trying to use report tax inside a SQL script?

BTW read this it will help your understanding bigtime.

http://www.sambapos.com/wiki/doku.php/custom_reporting

1 Like

Yes, haha, thanks again kendash

Wow, thanks for the link, exactly what I needed.

1 Like

Report tags are easier to use and much simpler as I demonstrated. For most cases they are just fine. SQL is much more flexible because it has endless possibilities constricted only by the SQL syntax. Report tags are coded by Emre to help solve most things without having to use long SQL code blocks.

I prefer Report Tags myself. In v5 Report Tags can be used for other clever things not just reports.

This explains most of the Report tags and their uses.

http://www.sambapos.com/wiki/doku.php/custom_reporting_tags

This shows some new abilities with v5.

http://www.sambapos.com/wiki/doku.php/custom_reporting_tags_for_v5

1 Like

Thanks Kendash will check it out on my way to the office tomorrow.

I have another question regarding the report. If I save the report, it is saved as an XPS file. Is there a way to save it as an (excel file) instead? like the csv builder does?

Or can I add a link below the table, that says (export sales data) ?

Cant you just open a CSV in excel?

Yes of course but when I save the report which is generated using the custom reports module. It saves as an XPS file. Which is similiar to a PDF format.

I wanted to know if it was possible to change the saving format to csv or to add a link below the report saying “export file” this would import the report as an csv rather than xps

Pretty sure you build your report in data export and use data export action.

Yes that is true but it displays the data as individual sales items of each product and not as my custom report which is as individual tickets.

It also doesnt show cash or card payments. Is there a way to add these on or change the format of this?

What does it look like in the preview?
Just dropped my WP report from testing database into data export and the preview seems to be as expected!

In v4 you only have option of saving it as xps. V5 it lets you export in multiple formats and you can define the layout of cells etc even.

There is no preview in v4 JTR :stuck_out_tongue: There also is not a Data Export in v4.

1 Like

I heard that V5 came out and I have returned :). I will be buying a license shortly but in the trial version I cannot seem to find a way to export data in multiple formats? This was my most anticipated feature.

I remember kendash saying that this would be available, can anyone point me in the right direction?

It is available as Data Exports feature inside Reports tab.

Here are some resources for you to get you started: