crystalvictim
Programmer
Hi everybody,
we're using crystal reports 8.5 professional (sap edition) and have recently encountered a strange problem.
The situation is as follows:
we have reports (mostly based on sap tables) which shall usually cover a certain period of time (e.g. lastfullmonth) and are therefore scheduled on our crystal enterprise server (8.5). But sometimes it may be neccessary to change this selection period. So what we did was introduce a parameter field (date range) which has a default value (01/01/2001) and create a conditional selection formula (if... then... else...) which checks the value of this parameter. If the default is used, the selection is set to cover the period lastfullmonth and otherwise the parameter's minimum/maximum are used.
The formula looks like this:
if ({?Datumsbereich}=date("01.01.2001") then
(
{EKKO.LIFNR}='0010267876' and
{EKKO.BUKRS}='0001' and
{EKKO.MANDT}='400' and
{EKKO.BSART}='B2' and
{EKKO.BEDAT}>=date("01.06.2003" and
{EKKO.BEDAT}<=date("25.06.2003"
)
else
(
{EKKO.LIFNR}='0010267876' and
{EKKO.BUKRS}='0001' and
{EKKO.MANDT}='400' and
{EKKO.BSART}='B2' and
{EKKO.BEDAT}>=Minimum({?Datumsbereich}) and
{EKKO.BEDAT}<=Maximum({?Datumsbereich});
);
So using this formula would lead to a dump, no matter what value the parameter has, while using just the first part (if-branch) works as expected.
It has been working - and we still have reports where it does - but since some days we're no longer able to create new reports using this technique. Whenever using the if-then-else construct, the report will dump with a timeout (i.e. it's querying the SAP-system for more than 5 minutes). This even happens if we use the same selection formula for then if- AND for the else-branch.
When using the selection formula without any "if", it works just fine, no timeout at all....
Does anyone have an idea oder has experienced something similar?
we're using crystal reports 8.5 professional (sap edition) and have recently encountered a strange problem.
The situation is as follows:
we have reports (mostly based on sap tables) which shall usually cover a certain period of time (e.g. lastfullmonth) and are therefore scheduled on our crystal enterprise server (8.5). But sometimes it may be neccessary to change this selection period. So what we did was introduce a parameter field (date range) which has a default value (01/01/2001) and create a conditional selection formula (if... then... else...) which checks the value of this parameter. If the default is used, the selection is set to cover the period lastfullmonth and otherwise the parameter's minimum/maximum are used.
The formula looks like this:
if ({?Datumsbereich}=date("01.01.2001") then
(
{EKKO.LIFNR}='0010267876' and
{EKKO.BUKRS}='0001' and
{EKKO.MANDT}='400' and
{EKKO.BSART}='B2' and
{EKKO.BEDAT}>=date("01.06.2003" and
{EKKO.BEDAT}<=date("25.06.2003"
)
else
(
{EKKO.LIFNR}='0010267876' and
{EKKO.BUKRS}='0001' and
{EKKO.MANDT}='400' and
{EKKO.BSART}='B2' and
{EKKO.BEDAT}>=Minimum({?Datumsbereich}) and
{EKKO.BEDAT}<=Maximum({?Datumsbereich});
);
So using this formula would lead to a dump, no matter what value the parameter has, while using just the first part (if-branch) works as expected.
It has been working - and we still have reports where it does - but since some days we're no longer able to create new reports using this technique. Whenever using the if-then-else construct, the report will dump with a timeout (i.e. it's querying the SAP-system for more than 5 minutes). This even happens if we use the same selection formula for then if- AND for the else-branch.
When using the selection formula without any "if", it works just fine, no timeout at all....
Does anyone have an idea oder has experienced something similar?