Page 1 of 1

CalcItem() does not take 0 arguments

Posted: Fri Oct 12, 2007 2:55 pm
by Sandy Pham
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

Posted: Sat Oct 13, 2007 3:12 am
by EDV Gradl
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

CalcItem() does not take 0 arguments

Posted: Mon Oct 15, 2007 11:39 am
by Guest
Try to set property "ConvertNulls" of the report to "True". And use this IIF function:

Code: Select all

IIF(Incident.IncidentDurationInDays == null || Incident.IncidentDurationInDays is System.DBNull, 0, Incident.IncidentDurationInDays)
Thank you.