OK
I have converted all Switch formulas in my report to Select Case but still get a report that takes 5 - 10 minutes just to evaluate one formula (Extremely long at creation of new formulas if I edit an existing formula it is OK). When the crystal evaluation of formulas and settings is done the actual data flow is normal
Will it speed up things if I make use of UFL’s for the formulas in the background?
If I could have made use of variables in Crystal query on ACCESS ODBC I could have perform most of these functions via SQL is it possiple ?
Attached an example of a detail line and one of the formulas that is used in it
DETAIL LINE
if {@nPeriod}>= 5 and {@PYDATA} = false
then
{@p1}+{@p2}+{@p3}+{@p4}+{@p5}
else
if {@nPeriod}>= 6 and {@YEAR}- {@InitFlag6} = {oehist50.Year} and {@PYDATA} = false
and {@CALCULATION} <> TRUE then
{@L1Start6M}
else
if {@nPeriod}>= 3 and {@YEAR}- {@InitFlag3} = {oehist50.Year} and {@NYears} = 1 and
{@PYDATA} = TRue
and {@CALCULATION} <> TRUE then
{@L1Start3M}
else
if {@nPeriod}>= 2 AND {@YEAR}- {@InitFlag2} = {oehist50.Year} and {@NYears} = 2
and {@PYDATA} = TRue and {@CALCULATION} <> TRUE then
{@L1Start2M}
ELSE
IF {@nPeriod}>= 2 and {@NYears} = 1 AND {@CALCULATION} = TRUE THEN
{@CALC2}
Formula to determine witch column or columns to use in database
Switch ({@InitStart6} = 1,{@LINE11},{@InitStart6} = 2,{@LINE12},
{@InitStart6} = 3,{@LINE13},{@InitStart6} = 4,{@LINE14},{@InitStart6} = 5,{@LINE15},{@InitStart6} = 6,
{@LINE16} ,{@InitStart6} = 7,{@LINE17},{@InitStart6} = 8,{@LINE18},
{@InitStart6} = 9,{@LINE19},{@InitStart6} = 10,{@LINE110},{@InitStart6} = 11,
{@LINE111},{@InitStart6} = 12,{@LINE112})