Hello,
I was wondering if I can make a formula evaluate differently depending on which report section it is in.
I am using Crystal 9.0 with SQL Server 2000.
I have a formual that gets the average or orders placed per month and it looks like this...
****************************************
numberVar MonthsOverall := ((DateDiff ("d", Minimum({PROC.Ordered_DT}, {@fld_Country_NM}), DataDate)) / 30);
If DistinctCount({PROC.Shipment_NO}, {@fld_Country_NM}) > 0 Then
If MonthsOverall >= 1 Then
DistinctCount({PROC.Shipment_NO}, {@fld_Country_NM}) / MonthsOverall
Else
DistinctCount({PROC.Shipment_NO}, {@fld_Country_NM})
Else
0.00
*****************************************
I actually have 3 versions of this formula 1 for Overall, 1 for Country Group & 1 for Site Group.
I wanted to make it 1 formual instead of 3 seperate formula's.
I wanted to do something like this...
If ReportSection = ReportHeader then
xyz
Else if ReportSection = CountryGroup then
xyz
Else
xyz
anyone know if something like this is possible?
I was wondering if I can make a formula evaluate differently depending on which report section it is in.
I am using Crystal 9.0 with SQL Server 2000.
I have a formual that gets the average or orders placed per month and it looks like this...
****************************************
numberVar MonthsOverall := ((DateDiff ("d", Minimum({PROC.Ordered_DT}, {@fld_Country_NM}), DataDate)) / 30);
If DistinctCount({PROC.Shipment_NO}, {@fld_Country_NM}) > 0 Then
If MonthsOverall >= 1 Then
DistinctCount({PROC.Shipment_NO}, {@fld_Country_NM}) / MonthsOverall
Else
DistinctCount({PROC.Shipment_NO}, {@fld_Country_NM})
Else
0.00
*****************************************
I actually have 3 versions of this formula 1 for Overall, 1 for Country Group & 1 for Site Group.
I wanted to make it 1 formual instead of 3 seperate formula's.
I wanted to do something like this...
If ReportSection = ReportHeader then
xyz
Else if ReportSection = CountryGroup then
xyz
Else
xyz
anyone know if something like this is possible?