Hi experts,
I have a real problem here. I have checked with our local senior crystal consultant and they were not able to help me.
I have defined a friendly date parameter called (?Process Date) and allow user to select
P - (current biz date)
C - (current system date) or
user input date (dd/MM/yyyy format)
The following formula is to parser the (?Process Date)
(@Parser Date)
LOCAL NUMBERVAR ndd:=0;
LOCAL NUMBERVAR nmm:=0;
LOCAL NUMBERVAR nyyyy:=0;
LOCAL STRINGVAR DbParser;
IF {?Process Date} = 'P' THEN
DATE(GetBizProcessDate)
ELSE IF {?Process Date} = 'C' THEN currentdate
ELSE
IF ISDATE({?Process Date}) THEN
(
nmm := ToNumber(TOTEXT(CDATE({?Process Date}), "MM");
ndd := ToNumber(TOTEXT(CDATE({?Process Date}), "dd");
nyyyy := ToNumber(TOTEXT(CDATE({?Process Date}), "yyyy");
IF ((nmm < 13) AND (ndd < 13)) THEN
(
DbParser := TOTEXT(CDATE(nyyyy, ndd, nmm), "MM/dd/yyyy"
CDATE(DbParser);
) ELSE CDATE({?Process Date})
)
ELSE DATE(0,0,0)
If user select 'P' options, the report will use the UFL function (GetBizProcessDate) to retrieve current biz process date from database.
Ok, the real problem is when I add this formula into the Selection Formula, it will not pass to SQL to process until it return all the records.
How can I improve this type of selection so that it will pass to SQL?
Your help is very much appriecated.
I have a real problem here. I have checked with our local senior crystal consultant and they were not able to help me.
I have defined a friendly date parameter called (?Process Date) and allow user to select
P - (current biz date)
C - (current system date) or
user input date (dd/MM/yyyy format)
The following formula is to parser the (?Process Date)
(@Parser Date)
LOCAL NUMBERVAR ndd:=0;
LOCAL NUMBERVAR nmm:=0;
LOCAL NUMBERVAR nyyyy:=0;
LOCAL STRINGVAR DbParser;
IF {?Process Date} = 'P' THEN
DATE(GetBizProcessDate)
ELSE IF {?Process Date} = 'C' THEN currentdate
ELSE
IF ISDATE({?Process Date}) THEN
(
nmm := ToNumber(TOTEXT(CDATE({?Process Date}), "MM");
ndd := ToNumber(TOTEXT(CDATE({?Process Date}), "dd");
nyyyy := ToNumber(TOTEXT(CDATE({?Process Date}), "yyyy");
IF ((nmm < 13) AND (ndd < 13)) THEN
(
DbParser := TOTEXT(CDATE(nyyyy, ndd, nmm), "MM/dd/yyyy"
CDATE(DbParser);
) ELSE CDATE({?Process Date})
)
ELSE DATE(0,0,0)
If user select 'P' options, the report will use the UFL function (GetBizProcessDate) to retrieve current biz process date from database.
Ok, the real problem is when I add this formula into the Selection Formula, it will not pass to SQL to process until it return all the records.
How can I improve this type of selection so that it will pass to SQL?
Your help is very much appriecated.