IanWaterman
Programmer
I need to group my report depending on an input from user, I am using the following formula to group.
If {?PRT_PARAM_STR1} = "Client Name" then {@Client_Name} else
If {?PRT_PARAM_STR1} = "Policy No" then {GENPOLICY.POLICY_KEY} else
If {?PRT_PARAM_STR1} = "Effective Date" then totext(date({ACCOUNTTRANSACTION.ACN_EFFECTIVE_DATE})) else
If {?PRT_PARAM_STR1} = "Product" then {GENPLAN.PLN_NAME}
Within the IF..then..else statment I can not mix strings and dates, so I have converted date to text.
Works OK except the date order is now in day order, 01/01/2003, 01/02/2003, 01....., 02/01/2003, 02/02/2003.
Two questions can I modify my grouping formula so that I can retain data type as date for the Effective Date sort,
or
Can I modify totext(date({ACCOUNTTRANSACTION.ACN_EFFECTIVE_DATE})) to yield date in format yyyy/mm/dd
Thank you
Ian
If {?PRT_PARAM_STR1} = "Client Name" then {@Client_Name} else
If {?PRT_PARAM_STR1} = "Policy No" then {GENPOLICY.POLICY_KEY} else
If {?PRT_PARAM_STR1} = "Effective Date" then totext(date({ACCOUNTTRANSACTION.ACN_EFFECTIVE_DATE})) else
If {?PRT_PARAM_STR1} = "Product" then {GENPLAN.PLN_NAME}
Within the IF..then..else statment I can not mix strings and dates, so I have converted date to text.
Works OK except the date order is now in day order, 01/01/2003, 01/02/2003, 01....., 02/01/2003, 02/02/2003.
Two questions can I modify my grouping formula so that I can retain data type as date for the Effective Date sort,
or
Can I modify totext(date({ACCOUNTTRANSACTION.ACN_EFFECTIVE_DATE})) to yield date in format yyyy/mm/dd
Thank you
Ian