Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Expression Syntax

$
0
0

I hope it's ok to post an Expression Syntax question in this forum for SSRS Expression Syntax help.

So I have this scenario...

30.000...I'd like to display on my report as 30

1.500...display as 1.50 or 1.500

<blank> or I think <null>...continue to display as <blank>

So this syntax works...

=IIf(IsNothing(Fields!InventoryQuantityOrdered.Value),"",Sum(Fields!InventoryQuantityOrdered.Value))

But when I add the portion checking to see if the Sum is equal to the Int of Sum...

=IIf(IsNothing(Fields!InventoryQuantityOrdered.Value),"",IIf(Sum(Fields!InventoryQuantityOrdered.Value) = Int(Sum(Fields!InventoryQuantityOrdered.Value)),Int(Sum(Fields!InventoryQuantityOrdered.Value)),IIf(IsNothing(Fields!InventoryQuantityOrdered.Value),"",Sum(Fields!InventoryQuantityOrdered.Value))))

It fails...or rather gives me the following warning...

Warning 1 [rsRuntimeErrorInExpression] The Value expression for the textrun ‘TXT_PurchaseInventoryQuantityOrdered_InAutoSubtotal1.Paragraphs[0].TextRuns[0]’ contains an error: Value cannot be null.  Parameter name: Argument 'Number' is Nothing. 

And what was once a <blank> is now displaying as #Error

Can someone help me out here?

Thanks for your review and am hopeful for a reply


Viewing all articles
Browse latest Browse all 10045

Trending Articles