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 6103869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:46:40+00:00 2026-05-23T13:46:40+00:00

I have a strongly-typed DataTable returned in a strongly-typed DataSet from a database query.

  • 0

I have a strongly-typed DataTable returned in a strongly-typed DataSet from a database query. The DataSet is subsequently passed to a ReportViewer to display a chart based on some aspects of the data.

I’ve added an extra column to the dataset and I’m looping through the table calculating a value for this new column based on one of the columns returned from the database.

The calculated column is a single byte value which is simply the first element of another column which is an array of bytes.

        foreach (ReportData.EventRangeRow row in ReportData.EventRange)
        {
            byte[] analysis = (byte[]) row[ReportData.EventRange.analysisColumn];

            row[ReportData.EventRange.first_analysisColumn] = analysis[0];
        }

Obviously my solution works but is a bit unwieldy, so I was wondering whether anyone could suggest a way of either automatically calculating the column as part of the typed dataset or if not, a linq statement which would achieve the same.

Thanks!

  • 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. Editorial Team
    Editorial Team
    2026-05-23T13:46:40+00:00Added an answer on May 23, 2026 at 1:46 pm

    You can do many calculations on the report itself, instead of extending your Dataset.

    Let’s say you have a datasource “MyDataTable” connected to your report.
    Then drag a textbox onto the report and right click on it and then choose Expression and you get a nice window for writing expressions with lots of examples

    One aggregate function could be…
    =First(Fields!MyColumn.Value, “MyDataTable”)

    Check the examples in the window under the category “Common Functions -> Aggregate”

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

Sidebar

Related Questions

I have a strongly typed dataset with a strongly typed datatable which i pass
I have a strongly-typed dataset (VB.NET), using .NET Framework 2.0. Given a DataRow in
I have a strongly typed view from which I want to insert some data.
I have a strongly typed view. I get model passed into the view and
I have a strongly-typed MVC View Control which is responsible for the UI where
I have a strongly typed user control (partial) and I'd like to be able
There's no strongly typed View() method to return an ActionResult. So, suppose I have
As the questions says I have always believed that a strongly typed list is
We have our own ORM we use here, and provide strongly typed wrappers for
When developing I like to have strongly typed objects for certain values. An example

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.