locked
#Error: How to resolve RRS feed

  • Question

  • User143067745 posted

    I am designing an rdlc report with VS 2008 and SQLServer 2008.

    I want  sum of a field on basis of some conditions into a textbox of my rdlc table.

    I have written expression for a textbox  as:

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
    		Fields!RevenueCapital.Value="Revenue Section" And
    		IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)	
    	,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0)
    	)
    
    Output: #Error

    But when  i am replacing bold fields from above with any number it is working fine as:

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
    		Fields!RevenueCapital.Value="Revenue Section" And
    		IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)	
    	,1,0)
    	)
    Ouput is: 36
    What I am missing? Please Help.



    Friday, January 11, 2013 3:00 AM

Answers

  • User143067745 posted

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
                    Fields!RevenueCapital.Value="Revenue Section" And
                    IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
            ,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0)
            )

    I Resolved it as:

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
                   
    Fields!RevenueCapital.Value="Revenue Section" And
                   
    IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
           
    ,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0.0D)
           
    )
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 11, 2013 4:17 AM

All replies

  • User-1716253493 posted

    how about

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND 
                    Fields!RevenueCapital.Value="Revenue Section" And 
                    IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value) 
            ,Fields!CURRENTYEARAPPROVED_NONPLAN.Value,0) 
            ) 
    

    Friday, January 11, 2013 3:23 AM
  • User143067745 posted

    Thanks a lot.

    I tried above.

    Only in three rows it is giving exact values.

    Rest of all are still #Error.

    What can be the reseaon?

    Friday, January 11, 2013 3:56 AM
  • User143067745 posted

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
                    Fields!RevenueCapital.Value="Revenue Section" And
                    IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
            ,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0)
            )

    I Resolved it as:

    =SUM(Iif(Fields!VOTED_CHARGED.Value="V" AND
                   
    Fields!RevenueCapital.Value="Revenue Section" And
                   
    IsNumeric(Fields!CURRENTYEARAPPROVED_NONPLAN.Value)
           
    ,CDec(Fields!CURRENTYEARAPPROVED_NONPLAN.Value),0.0D)
           
    )
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 11, 2013 4:17 AM