Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 SSRS 2005 - Whats wrong with the following express

Author  Topic 

bigweed
Starting Member

19 Posts

Posted - 2010-12-04 : 21:39:07
Hi all

Can someone please advise as to what the problem is with the following expression:

=iif((Fields!CATEGORYID.Value, "ItemActual") = "Materials",sum(Fields!Total.Value, "ItemActual"), 0)

I am trying to return sum of Total field where Category field is Materials, into a textbox which is in the report body, not inside a data region. But I am getting the following error:

[rsCompilerErrorInExpression] The Value expression for the textbox Total contains an error: [BC30455] Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.

Cheers!

tripleZ
Starting Member

7 Posts

Posted - 2010-12-15 : 16:41:58
I think you might want this:

=sum(iif(Fields!CATEGORYID.Value = "Materials",Fields!Total.Value, 0))

but you would have to put it in a group of some kind to work. To work within the detail line would require inserting a select statement. You are better off providing the data in the base query if you want it there.

Mike
Go to Top of Page
   

- Advertisement -