rdlcvisual-studio-2022reportviewer

ReportViewer Visual Studio 2022 Wrong Calculation because 0 value


I have a problem in my project

The calculation is wrong because there is 0 value on one of my other calculation Here the report looks like

Here What My ReportViewer Result Looks Like

And here the expression that i use

Here What Expression I Use

if i remove the expression "ReportItems!GTCategoryC.Value" the calculation became right but if i change the date and category c not null then it will be wrong

i need the calculation to be right even if category c or any other category is not null

What Should i do to fix it?

Thank you...


Solution

  • The Reason that make the calculation wrong is NULL Value So I try to make an exception in the expression Here what the Right Expression Are

    =IIf(Fields!TicketId.Value Is Nothing, 0, Count(Fields!TicketId.Value))
    

    This change the NULL value to 0 (Zero)