CalcItem() does not take 0 arguments

Stimulsoft Reports.NET discussion
Post Reply
Sandy Pham
Posts: 62
Joined: Mon Dec 11, 2006 1:43 pm
Location: U.S.A.

CalcItem() does not take 0 arguments

Post 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
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

CalcItem() does not take 0 arguments

Post 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
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

CalcItem() does not take 0 arguments

Post 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.
Post Reply