Crystal Reports IX -- Group “by Month and Year”

finance_teacher
finance_teacher used Ask the Experts™
on
What is the correct formula in below step #7
so I split the DATE field into one additional
fields, Year/Month, so the attached 1.jpg
report can be grouped by Year/Month
like the attached 1.xls ?

1.      Open Report1.rpt in CrystalReports XI
2.      Report
3.      Group Expert
4.      Options
5.      Check “Use a Formula as Group Sort Order”
6.      Hit “x-2” ICON
7.      Enter a formula like “substring (DATE, 1, 2)”… ?
1.jpg
1.xls
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010

Commented:
Start with ToText({yourdate},"yyyyMM"), and add slashes or dashes as you please.

Author

Commented:
Get attached error.
s001.jpg
Top Expert 2010

Commented:
Are you sure it's really a date?
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
That formula must return
crAscendingOrder, crDescendingOrder, or crOriginalOrder

You can't use it for the formula to sort the data rather just specify which order

Are you trying to sort the groups by an order other than the order you get with the group names?

mlmcc
Top Expert 2010

Commented:
Good catch.

Finance Teacher, my original suggestion needs to go into a regular formula, then you group on that formula.  

Author

Commented:
Ok, I will test

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial