Link to home
Start Free TrialLog in
Avatar of Cindy
CindyFlag for United States of America

asked on

Crystal Reports function

Created the parameter, ?Data Range.  The data associate with the date range parameter is string data in the format of 2011-01-01.  I need for it to display as January 01, 2012 on the report.  How do I get the parameter to display in that format in the report?  I cannot use the text format to change it.  Thanks.

not ({Asgnmnt.Resolution} in ["Completed", "Reassigned"]) and
{Subset.CustType} = "CJLEADS" and
{CallLog.CallStatus} in ["Pending", "Working"] and
{CallLog.RecvdDate} = {?Data Range}
Avatar of felipevidaurri
felipevidaurri
Flag of Mexico image

Try this code:

not ({Asgnmnt.Resolution} in ["Completed", "Reassigned"]) and
{Subset.CustType} = "CJLEADS" and
{CallLog.CallStatus} in ["Pending", "Working"] and
{CallLog.RecvdDate} = ToText({?Data Range}, "MMMM dd, yyyy")
Avatar of Mike McCracken
Mike McCracken

Since the date range oarameter is a string and an array the above formula will give an error

Is this for display in the report or for use in the selection formula?
Are the dates in the database strings?

How are you changing them to display correctly

I believe in the report you can use

ToText({?Data Range}[1], "MMMM dd, yyyy") 

ToText({?Data Range}[2], "MMMM dd, yyyy") 

Open in new window


If that doesn't work try
ToText(Minimum({?Data Range}), "MMMM dd, yyyy")

ToText(Maximum({?Data Range}), "MMMM dd, yyyy")

mlmcc
SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cindy

ASKER

I don't think I made it very clear.  I created the a parameter called date range.  I inserted the parameter.  The formula is  not ({Asgnmnt.Resolution} in ["Completed", "Reassigned"]) and{Subset.CustType} = "CJLEADS" and {CallLog.CallStatus} in ["Pending", "Working"] and
{CallLog.RecvdDate} = ({?Data Range}.   The parameter works fine with this formula.

I created a x-1 formula titled it "startdate"  The formula is mimimum({date range}).  I've added the "startdate" in the Report header title.  It design view it displays in the title As of "@startdate".   When I go previewing report, title displays as As of 2011-11-18.  I would like for it to display in the text format of November 18, 2012.  I think you all are on the right track.  When I added the above formulas I keep receiving the error message, a Error: A Number, Currency Amount, Boolean, Date, Time, Date-Time, or String Is Expected Here.  I am using crystal reports XI.  

Thanks.
Change your StartDate formula to James formula

mlmcc
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cindy

ASKER

James, your formual worked.  Thanks so much for your assistance with this.
You're welcome.  Glad I could help.

 James