I have a report that I am grouping by a particular database column that may have NULL in it. Because of the NULL values, I get the following compiler error:
error CS1501: No overload for method 'CalcItem' takes '0' arguments
How can I make it handle null values?
In the Group Header band, the Group Condition is:
{Incident.IncidentDurationInDays}
I tried changing it to this, but I still received the same compilation error:
iif(IsNull(Incident,{Incident.IncidentDurationInDays}), 0, {Incident.IncidentDurationInDays})
It would be even better if the Stimulsoft code could handle NULL values. I would think this would be a common problem for many people since databases frequently have NULLs in them.
Thanks for your help,
Sandy
CalcItem() does not take 0 arguments
-
- Posts: 62
- Joined: Mon Dec 11, 2006 1:43 pm
- Location: U.S.A.
CalcItem() does not take 0 arguments
If the Nulls cause the error, your could make new new calulated column with your formula, and do the grouping against the new caluculated column. Don't know if it works, it's just a guess.
Marco
Marco
CalcItem() does not take 0 arguments
Try to set property "ConvertNulls" of the report to "True". And use this IIF function:
Thank you.
Code: Select all
IIF(Incident.IncidentDurationInDays == null || Incident.IncidentDurationInDays is System.DBNull, 0, Incident.IncidentDurationInDays)