dcsimg
Results 1 to 3 of 3

Thread: [Resolved]How do I put in the sum for each of the values for this SSRS expression

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2004
    Posts
    785

    [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.

  2. #2
    Frenzied Member
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    1,212

    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.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2004
    Posts
    785

    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
  •  



Featured


Click Here to Expand Forum to Full Width