troubleshooting Question

Crystal Reports date formatted as string, how to group

Avatar of Tina K
Tina KFlag for United States of America asked on
Crystal Reports
2 Comments1 Solution488 ViewsLast Modified:
Hi Experts -
I have a report showing open orders, both past due and future - the ship date (a formula named @due_date) being Group#1.  I needed order lines past due to to display 'Past Due', rather than the date, and the future shipments to show the ship date.   I accomplished this by converting all the dates to text, doing a comparison, and using the text where appropriate.  However, now I've lost the ability to group my dates by month - since they are not dates anymore.  Now I have a six page report with a group header for each ship date, instead of the desired summary showing all shipments by month.
Any ideas how to get the grouping back?  Or did I handle the group formula incorrectly?

Original formula, returns error of 'String Required..' at last line :
if {@Due Date} < currentdate() then
'Past Due '
else
{@Due Date}

So, I did this:
if totext({@Due Date}, "MM/dd/yyyy") < totext(currentdate(), "MM/dd/yyyy") then
'Past Due as of '
else
totext({@Due Date}, "MM/dd/yyyy")

Works, but as mentioned, I can't group text fields by month.

Thanks!
ASKER CERTIFIED SOLUTION
James0628

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros