Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal reports 10 - How to sort a group parameter field from A-Z

Status
Not open for further replies.

lbass

Technical User
Feb 9, 2002
32,816
US
You need to format the date, which is a string. So how does it currently display? MM/dd/yyyy? Or what is the format?

-LB
 
Thanks!!...

well I actually went back into the database and updated my script..

TO CHAR

and refreshed the report and now the report date looks great 01/12/2011

but this field is part of a group parameter so when a user selcts to group by seniority date it poulates in the report but not ascending at all.
 
so before I updated my script the filed in the databse was

01/12/2011 00:00 00PM

now its

01/12/2011

so after refreshing the crystal report the date formatted correctly but couldnt get the field to sort A-Z

is it probaby something I need to do within the group parameter?
 
So is that December 1 or January 12? dd/MM/yyyy or MM/dd/yyyy?

-LB
 
Replace your string date with the following formula:

stringvar sdt := {CW_VW_209_SEN_CALLIN_SHEET.SENRTY};
totext(date(val(mid(sdt,7)),val(mid(sdt,4,2)),val(left(sdt,2))),"yyyy/MM/dd")

This will result in the correct sort.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top