Custom Reports - Filtering by date of Ticket Tag

Hi Everyone,

I’ve been working on a home delivery system within SambaPOS for a cafe who takes orders a few days prior to delivery of the order. A big big thanks to @Jesse for the guidance to help me pass existing barriers.

I’m now at the stage where i’m building a custom report to allow staff to print a report of upcoming orders. I have a ticket tag called DeliveryDate that contains the date of delivery. I was hoping to be able to filter by this tag on the Report screen so staff can select the date and print out a report.

This is what i have so far for the report. Quite simple but it contains the info required.

Any help would be greatly appreciated!

Thanks,
James

Edit: Now running V5

Any advice? Still stuck on this i’m afraid :frowning:

I am trying to stop the searches from only searching a single work period and instead use the date range on the right side of the report screen.

Cheers

@JimT you want to make report date filter to work with delivery date instead of ticket date. The only way to do it by creating a custom SQL Script but it will need some parsing and date conversion as we store ticket tags as JSon data format.

Alternatively I’ve demonstrated a new custom report viewer widget feature here.

1 Like

@emre you are amazing. I will be trying this today

Thank you!

Hi @emre, Are you able to show me some screenshots of both report viewer and editor widget properties and the settings of the Automation command “Display Delivery Report” from your example setup for “Passing parameters to Custom Report Viewer Widget”

Thanks!

There is nothing special with widgets.

This is custom report viewer settings.

report viewer properties.

Editor settings.

Editor properties.

Nothing configured for Display Delivery Report command as it can work without defining a command. Automation Command definitions is useful if they’ll appear as button.

You may want to setup an edit mask for editor widget as you’ll only enter dates there. To construct regex mask for your date format you can find some tips on this topic.

1 Like

Appreciate the time spent helping me @emre!

Not having much luck i’m afraid. Everything looks to be set.I did notice my date format differs to your example setup (e.g d/mm/yyyy 14/09/2015)

Here are my report parameters and how my ticket tag looks in SQL. They work without the $1 parameter when displaying results for a particular work period on the Reports screen.

Cheers

(DE=Ready Meals,TT.Delivery Date=$1) expression is wrong. I’ll suggest you to make it work without adding extra expressions and when it works as expected start adding other stuff.

PS: you can use multiple expressions with and or or operators. Like (DE=Ready Meals) and (TT.Delivery Date=$1)

1 Like

Thanks @emre, that did the trick.

However, I can’t seem to search for orders that were created on a different work period. Is this by design? I was hoping this would allow me to search for orders without being confined to a work period…

Cheers

On report viewer widget settings where you set Report Name change Delivery Report as Delivery Report:This Week. I think that will work fine for you.

AND that now makes 231 book marks! Will be a very old man if a finish re-reading these again :sweat_smile:

1 Like

Thanks. Is there any way to have it set to search all by default rather than “This Week”?

Just incase they would like to search back on previous delivery runs or if they would like to bring up results for deliveries the week after.

Searching all is not necessary and I think that will work slow when you have a lot of tickets. How many days it can go back at most? If you want I can implement a filter like Last x Days maybe?

1 Like

It wouldn’t be any more than the last month. @emre so that would be great!

How about the scenario where if i wanted to search for tickets that had a delivery date the following week? E.g On a Thursday they decide to see what deliveries are in the system for a date that happens to be on the following week.“This Week” wouldn’t work for those right?

That does not filters tickets by delivery date. It filters tickets by ticket creation date. If ticket created in filter range it will work for every delivery dates.

I’ve implemented Last x Days feature. You can try it on .50 version. I think that will solve your issue with dates.

Edit: Hmm. I think I misunderstood your question. Delivery date is just a string data (it can be a date or your name) so we don’t make a date range comparison there.

1 Like

For next release (.50) I’ve implemented few related features. You’ll find more info on release notes. Thanks.

Thanks @emre, when will the release notes be available? Keen to try

Cheers