-
Feb 7th, 2018, 02:45 PM
#1
Thread Starter
Fanatic Member
[Resolved]How do I put in the sum for each of the values for this SSRS expression
Code:
= Format(Fields!EquityCommission.Value, "C") &
IIf(Fields!InsuranceLabel.Value <> "", VbCrLf & Format(Fields!InsuranceCommission.Value, "C"), "") &
IIf(Fields!ExceptionLine1Label.Value <> "", VbCrLf & Format(Fields!ExceptionLine1.Value, "C"), "") &
IIf(Fields!ExceptionLine2Label.Value <> "", VbCrLf & Format(Fields!ExceptionLine2.Value, "C"), "")
When I tried this below
Code:
= Format (SUM(Fields!EquityCommission.Value), "C") &
SUM(IIf(Fields!InsuranceLabel.Value <> "", VbCrLf & Format(SUM(Fields!InsuranceCommission.Value), "C"), "") &
SUM(IIf(Fields!ExceptionLine1Label.Value <> "", VbCrLf & Format(Fields!ExceptionLine1.Value, "C")), "") &
IIf(Fields!ExceptionLine2Label.Value <> "", VbCrLf & Format(SUM(Fields!ExceptionLine2.Value, "C"), "")
It gave me this error upon previewing the report:
There is a syntax error in the Value expression for the textrun ‘Expense2.Paragraphs[0].TextRuns[0]’: ‘)’ expected.
Last edited by Christopher_Arm; Feb 7th, 2018 at 04:18 PM.
-
Feb 7th, 2018, 04:10 PM
#2
Re: How do I put in the sum for each of the values for this SSRS expression
You are missing an ending parenthesis ")" somewhere in the code, after you added the SUM() function. Determine where you need that to go and insert it.
-
Feb 7th, 2018, 04:16 PM
#3
Thread Starter
Fanatic Member
Re: How do I put in the sum for each of the values for this SSRS expression
Fixed it. It should be this in reality.
Code:
= Format( Sum(Fields!EquityCommission.Value), "C") &
IIf(Fields!InsuranceLabel.Value <> "", VbCrLf & Format(Sum(Fields!InsuranceCommission.Value), "C"), "") &
IIf(Fields!ExceptionLine1Label.Value <> "", VbCrLf & Format(Fields!ExceptionLine1.Value, "C"), "") &
IIf(Fields!ExceptionLine2Label.Value <> "", VbCrLf & Format(Fields!ExceptionLine2.Value, "C"), "")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|