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

  • Home
  • SEARCH
  • 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 6358773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:25:53+00:00 2026-05-24T23:25:53+00:00

I am trying to update a Microsoft report. What it does is write out

  • 0

I am trying to update a Microsoft report. What it does is write out how many clients where excluded from a conversion process and for what reason. Currently the program writes all of the deleted clients back to the server then queries it back to fill a specialty table with the results.

Here is the current query:

SELECT  DeletedClients.Reason, 
        COUNT(DeletedClients.Reason) AS Number, 
        CAST(CAST(COUNT(DeletedClients.Reason) AS float) 
            / CAST(t.Total AS float) 
            * 100 AS numeric(4, 1)) AS percentage
FROM DeletedClients CROSS JOIN
    (SELECT COUNT(*) AS Total
    FROM DeletedClients AS DeletedClients_1
    WHERE (ClinicID = @ClinicID)) AS t
WHERE (DeletedClients.ClinicID = @ClinicID) 
    AND (DeletedClients.TotalsIdent = @ident)
GROUP BY DeletedClients.Reason, t.Total
ORDER BY Number DESC

What I would like to do is not write DeletedClients to the server as it already exists in memory in my program as a DataTable and it is just slowing down the report and filling the database with information we do not need to save.

My main question is this, Either :

How do I query a data table to make a new in memory data table that has the same results as if I wrote out the the SQL server and read it back in with the query above?

OR

How in Microsoft Reports do you do a group by clause for items in a Tablix to turn =Fields!Reason.Value =Fields!Number.Value =Fields!percentage.Value into something similar to the returned result from the query above?

  • 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-24T23:25:54+00:00Added an answer on May 24, 2026 at 11:25 pm

    You can use DataTable.Select to query the DataTable.

    DataTable table = GetDataTableResults();
    DataTable results = table.Select("SomeIntColumn > 0").CopyToDataTable();
    

    Or for more complex queries, you can use LINQ to query the DataTable:

    DataTable dt = GetDataTableResults();
    
    var results = from row in dt.AsEnumerable()
                  group row by new { SomeIDColumn = row.Field<int>("SomeIDColumn") } into rowgroup
                  select new
                  {
                      SomeID = rowgroup.Key.SomeIDColumn,
                      SomeTotal = rowgroup.Sum(r => r.Field<decimal>("SomeDecimalColumn"))
                  };                    
    
    DataTable queryResults = new DataTable();
    foreach (var result in query)
        queryResults.Rows.Add(new object[] { result.SomeID, result.SomeTotal });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a project trying to update a page reading from an
I am trying to update a field in a table with data from another
Hi I am trying to update a div with some html from another div.
I'm trying to bind a plugin to the update contact event in Microsoft Dynamics
I'm trying to make a working program from this example: http://msdn.microsoft.com/en-us/library/ms741870.aspx . I think
I'm getting this error when I'm trying to update a record: ERROR [HY000] [Microsoft][ODBC
I am trying to figure out if an update query is really what I
I am trying update my version of sqlite3 on mac os x 10.5.7 I
I trying to update a model on a callback but the validation is causing
I'm trying to update a hashtable in a loop but getting an error: System.InvalidOperationException:

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.