Max Date on Group Created by Formula

Printed From: Crystal Reports Book — Forum Name: Technical Questions

I am using Crystal 2011. I'm attempting to pull in the Max date on a group I've defined. The report is grouped by Employee ID, then by my custom group. Below is my formula for the custom group:

If(reviewcode)startswith "LVL1I" or (reviewcode)startswith "LVL1A" then 1 else
If(reviewcode)startswith "LVL2" then 2 else
If(reviewcode) startswith "LVL3" then 3 else
If(reviewcode) startswith "LVL4" then 4 else
If(reviewcode)startswith "LVL5" then 5

The max date is returning successfully except for anything categorized as 1. I'd expect to return the max date regardless if a reviewcode was "LVL1I" or "LVL1A", but it returns the max date for only anything as "LVL1I".

How can I get the report to return the max date for anything categorized as 1?




Edited by thummel1 - 14 Sep 2016 at 7:49am
For those looking, I may have found the culprit. My date field is formatted like a string and not as a date, so it's not going to read properly I think. I will look at fixing that and then trying to run this.