Crystal Reports XI
SQL database
I am trying to filter the most recent score based on a group. My table has customerid, scoretype, score, date created. I have grouped on customerid and under selection formulas - group I added the following formula:
{DATECREATED} = Maximum ({DATECREATED}, {CUSTOMERID})
and
{SCORETYPE} = 4142
I am running into 2 problems. If there isn't a record for a customer for the score type I am looking for then I need to display a zero for the score. The other problem I have is I need to group on the score result to sort customers by highest to lowest score. When I group on the score result currently; it displays all scores for a particular client instead of just the most recent score. Any suggestion would be greatly appreciated.
SQL database
I am trying to filter the most recent score based on a group. My table has customerid, scoretype, score, date created. I have grouped on customerid and under selection formulas - group I added the following formula:
{DATECREATED} = Maximum ({DATECREATED}, {CUSTOMERID})
and
{SCORETYPE} = 4142
I am running into 2 problems. If there isn't a record for a customer for the score type I am looking for then I need to display a zero for the score. The other problem I have is I need to group on the score result to sort customers by highest to lowest score. When I group on the score result currently; it displays all scores for a particular client instead of just the most recent score. Any suggestion would be greatly appreciated.