Hi -
I need help, I've tried everything I can think of to get this to work, but no success. So I am hoping one you Crystal Guru's can assist me or at lest point me in the right directions.
I am using Crystal XI, my datasourse is a universe.
I have created a Parameter called ?AsOfDate, this parameter can either be a date or string type, whichever one will work.
Basically if an As of Date is not entered then the {?AsOfDate} needs to default to the currentdate, However, if an As Of Date is entered then the {?AsOfDate} needs return data where the:
{Main.Eligibility Date} <= {?AsOfDate} AND {Main.Record Cancel Date} >= {?AsOfDate}
This is one of codes/formulas I've tried:
if isnull({?Effective Date}) then Currentdate
else
(cdate({Main.Eligibility Date}) <= {?AsOfDate} AND cdate({Main.Record Cancel Date}) >= {?AsOfDate})
I've tried creating different variations of this formula but I keep getting errors that the section after the ELSE needs to be a string or a date
I've tried changing the parameter type from date to string but same error.
I've placed this code in the Select Records section same error,
I've tried to created a formula to place in the report, same error.
Also ({Main.Eligibility Date}) and ({Main.Record Cancel Date})) are both datetime fields, I've tried converting them to cdate or totext, but same error as above.
I know I must be way off on how to accomplish, any help would be greatly appreciated.
I hope my question and examples make sense, if you more explaination let me know, I'll be more than happy to provide what info you need.
Thank you for your help.
Lpbruce
I need help, I've tried everything I can think of to get this to work, but no success. So I am hoping one you Crystal Guru's can assist me or at lest point me in the right directions.
I am using Crystal XI, my datasourse is a universe.
I have created a Parameter called ?AsOfDate, this parameter can either be a date or string type, whichever one will work.
Basically if an As of Date is not entered then the {?AsOfDate} needs to default to the currentdate, However, if an As Of Date is entered then the {?AsOfDate} needs return data where the:
{Main.Eligibility Date} <= {?AsOfDate} AND {Main.Record Cancel Date} >= {?AsOfDate}
This is one of codes/formulas I've tried:
if isnull({?Effective Date}) then Currentdate
else
(cdate({Main.Eligibility Date}) <= {?AsOfDate} AND cdate({Main.Record Cancel Date}) >= {?AsOfDate})
I've tried creating different variations of this formula but I keep getting errors that the section after the ELSE needs to be a string or a date
I've tried changing the parameter type from date to string but same error.
I've placed this code in the Select Records section same error,
I've tried to created a formula to place in the report, same error.
Also ({Main.Eligibility Date}) and ({Main.Record Cancel Date})) are both datetime fields, I've tried converting them to cdate or totext, but same error as above.
I know I must be way off on how to accomplish, any help would be greatly appreciated.
I hope my question and examples make sense, if you more explaination let me know, I'll be more than happy to provide what info you need.
Thank you for your help.
Lpbruce