Customer BirthDays

Hello every Samba User !!!

I am trying to run a report where I can find out which custoemrs have birthdays

right now i am able to see the following:

[Customer BirthDay:4 ,3 ,6 ,3,2]

Name|Telefono|email|Date of Birth
{REPORT ENTITY DETAILS:EC.Customer Name, EC.Phone, EC.Email, EC.DOB:(ET=SambaCard Customer Card)}

however with that it gives me a huge list of all customers, is there a way to filter in the report by customers who have birthdays only???
Want to be able to send them an email to those customers so having a report with the info available is quite handy

thanks for you help!!

Using report tags

Is an available report tag expression.
Could give you birthdays of a specific date but not sure if you could use multiple with < and > to give a range.
Others with more experiance might have sugestion.
Should be doable with a script for range or anything

Yes you can use basic greater than less than, equals operators to evaluate the expression to in fact if you look at default v5 reports several of those use these optional expressions.

This is a sample from the default Work Period report

[Payments:2, 1, 2]

{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:Payment.Amount > 0}

>Total|{REPORT PAYMENT DETAILS:P.Amount.Sum:Payment.Amount > 0}

Notice the Payment.Amount > 0

I am lost i think

[Customer BirthDay:4 ,3,1]

Name|Date of Birth
{REPORT ENTITY DETAILS:EC.Customer Name, EC.DOB:(ET=SambaCard Customer Card) > (dt.Day())}

should i be using dt.Day(day=0)???

If you look at kendashes example (but I am not pro on report tags) you would use something allong the lines of EC.DOB = DATE.

The last : moves to the expressions/constraints section;

(ET=SambaCard Customer Card) > (dt.Day()) by my understanding would be saying is ET=SambaCard Customer Card and guessing retunring True/False and then your saying True/False > Date()…
Pretty sure thats not going to work.

This is not exact but a jist/idea of how I believe it would be which is
{REPORT ENTITY DETAILS:EC.Customer Name, EC.DOB:(ET=SambaCard Customer Card) AND (EC.DOB > dt.Day())}

I am not to sure on your dt.Day as if its anything just jscript ive used in some of my scripts that would return the number of the Day of the month.
I spent allot of time getting to grips with dates as date format is very important.
Also have you set the entity field to string or date as this will also make a big diference.

thanks @JTRTech i will give it a try, i am new so i am trying to understand on how to use the expressions.
I have it set as string

Dates can be very tricky and your system date format will likely impact this also.
If its stored as a stink you will also have to account for user input differences, might be better to change it to a date field or set a mask so format is consistent.

Search the forum for ‘reports in detail’ and look for a post from emre from v4, I always refer to this when working on report tags.

I will try setting it up as date and i have it as ##-##-####
Will look more into report in details. Hope i can make it work.

Finding birthday needs some custom work as we need to match days and months instead of full dates.

This is my Entity Custom Field configuration.

Here is my report.

You’ll notice I have two reports. First part of the report is what you’ll need. You’ll notice customer birthday appears as local date time format.

[Customer BirthDay:1,1]
Name|Date of Birth
  && DateTime.Parse(Entity.GetCustomData("DOB")).Day==DateTime.Now.Day
  && DateTime.Parse(Entity.GetCustomData("DOB")).Month==DateTime.Now.Month}

Second part formats birthday value to strip time part and reformat birthday. You’ll need TD function to make that conversion. That function will be available on next refresh (.58). Until next update you can use first format to test your report.

[Customer BirthDay2:1,1]
Name|Date of Birth
  && DateTime.Parse(Entity.GetCustomData("DOB")).Day==DateTime.Now.Day
  && DateTime.Parse(Entity.GetCustomData("DOB")).Month==DateTime.Now.Month}

This sample also demonstrates how to use entity custom data in expression parts. I hope you’ll find it useful.


@emre I suppose E.Name is for Primary Entity Field, right ?

I have renamed my PEM and changed it on report but for some reson is not working …

Thank you very much @emre