Maven4Champ
Technical User
- Jun 16, 2004
- 154
Greetings,
I am writing formulas to handle null values in my view. In doing so, I am trying to appropriately count a field that has some values and some null values.
I have tried the CONVERT NULL FIELD TO DEFAULT VALUE procedure and this doesn't provide the desired result.
Here is the low-down:
Crystal 8.5
Oracle Database (using materialized views for quicker reporting speeds)
My formulas are as follows to get a count:
//@1DayTurn
IF {V_ADF_REPORT.ADF} = 1 THEN {V_ADF_REPORT.ORDER_NUM}
//@1DayTurnDCount
distinctcount({@1DayTurn}, {V_ADF_REPORT.REGION})
What I was doing previously was subtracting 1 from @1DayTurnCount which works fine when it encounters a null and counts in the distinctcount. However I have just recently learned that if it encounters no nulls, it obviously still subtracts 1 thus resulting in a lower numbre than expected.
Here is my report design:
REPORT HEADER
GROUP HEADER: REGION
DETAILS
GROUP FOOTER: REGION
REPORT FOOTER
I am displaying @1DayTurnDCount in my report. Turning off and on the SET NULL TO DEFAULT VALUE doesn't provide the appropriate number.
Without a mass overhaul, is there a way to integrate a calculcation into my existing report formulas so that I don't have to reinvent the wheel all together?
Thanks!
I am writing formulas to handle null values in my view. In doing so, I am trying to appropriately count a field that has some values and some null values.
I have tried the CONVERT NULL FIELD TO DEFAULT VALUE procedure and this doesn't provide the desired result.
Here is the low-down:
Crystal 8.5
Oracle Database (using materialized views for quicker reporting speeds)
My formulas are as follows to get a count:
//@1DayTurn
IF {V_ADF_REPORT.ADF} = 1 THEN {V_ADF_REPORT.ORDER_NUM}
//@1DayTurnDCount
distinctcount({@1DayTurn}, {V_ADF_REPORT.REGION})
What I was doing previously was subtracting 1 from @1DayTurnCount which works fine when it encounters a null and counts in the distinctcount. However I have just recently learned that if it encounters no nulls, it obviously still subtracts 1 thus resulting in a lower numbre than expected.
Here is my report design:
REPORT HEADER
GROUP HEADER: REGION
DETAILS
GROUP FOOTER: REGION
REPORT FOOTER
I am displaying @1DayTurnDCount in my report. Turning off and on the SET NULL TO DEFAULT VALUE doesn't provide the appropriate number.
Without a mass overhaul, is there a way to integrate a calculcation into my existing report formulas so that I don't have to reinvent the wheel all together?
Thanks!