Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 151871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:31:19+00:00 2026-05-11T09:31:19+00:00

This seems like it should be simple but I can’t find anything yet. In

  • 0

This seems like it should be simple but I can’t find anything yet. In Reporting Services I have a table with up to 6 rows that all have calculated values and dynamic visibility. I would like to sum these rows. Basically I have a number of invoice items and want to make a total. I can’t change anything on the DB side since my stored procedures are used elsewhere in the system. Each row pulls data from a different dataset as well, so I can’t do a sum of the dataset. Can I sum all the rows with a table footer? Similarly to totaling a number of rows in Excel? It seems very redundant to put my visibility expression from each row into my footer row to calculate the sum.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:31:20+00:00Added an answer on May 11, 2026 at 9:31 am

    A few ways you could achieve this:

    1. Do the calculation in the SQL and sum that field, like so:

    SELECT Quantity, Amount, Quantity * Amount As TotalAmount FROM MyTable 

    Then just use the TotalAmount field in your Detail row and sum it in the footer.

    2. Create a second Dataset that calculates the total for you and use that in your footer instead of a sum:

    =Sum(Fields!TotalAmount.Value, 'MyTotalingDataset') 

    3. Do it using custom code. Right-click on the Layout space choose Properties and click on the Code tab. Put in the following code:

    Public Dim TotalAmount As Double = 0  Public Function CalculateRowTotal(ThisValue As Double, ThatValue As Double) As Double     TotalAmount = TotalAmount + (ThisValue * ThatValue)     Return ThisValue * ThatValue End Function 

    On the Detail band, make the column where you sum the field have this expression:

    =Code.CalculateRowTotal(Fields!Quantity.Value, Fields!Amount.Value) 

    This will execute the code above and do your calculation plus calculate the total sum in the process.

    The Footer band displays the total sum so the column has the expression:

    =Code.TotalAmount 

    And you’re done. Just be careful because you aren’t guaranteed the order in which your code will execute and for some reports it will execute the footer first (for example, if you use the Sum of the rows in the Detail band) which would make the total zero as the Detail band calculations haven’t happened yet, but for the general case this should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like it should have a simple solution but I can't seem to
This seems like it should be very simple but I can't get it to
This seems like it should be so simple, but apparently it isn't. I have
This seems like it should be fairly simple, but for some reason I can't
This seems like it should be simple, but I can't figure it out. I'm
This seems like it should be simple enough, but I can't seem to get
This seems like a simple problem but I can't seem to find the answer.
This seems like it should be simple but I can't work out how to
This seems like it should be simple, but I can't figure out how to
This seems like it should be really simple to do but I just can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.