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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:43:57+00:00 2026-05-30T01:43:57+00:00

I have a report which grabs a whole bunch of statistical data that represent

  • 0

I have a report which grabs a whole bunch of statistical data that represent system alarms.

I’ve made a drilldown style report by pulling back all the stats in a user selected date range and then I added a group on my alarm’s codeId so I would have something to group on.

What I would like to do is have a count of the number of items within these groups by codeId. I plan to use the count as part of a concatenated string that makes up the whole group header. It basically says “Alarm Code # {codeId} – {Description} – Total: {Total}”.

My issue is that to do a count in my query then I have to pre-group the data before it hits the report. And if I do that then I do not have my detail data to expand the group on. And running a summary and a detail dataset is a bit over my head but an option I might have to look into.

So I was hoping I could use a group variable to count the number of items contained within the group. Can anyone tell me a rough set of steps to try to pull that off?

  • 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-30T01:43:58+00:00Added an answer on May 30, 2026 at 1:43 am

    Seems like using a Group variable here would make this more complicated than it needs to be.

    Since you already have a group in SSRS, you can use the CountRows function. Put this expression into a placeholder, for example:

    ="Alarm Code #" & Fields!CodeID.Value
     & " - " & First(Fields!Description)
     & " - Total: " & CountRows()
    

    Or, depending on size, you can add a correlated subquery to your SQL query:

    SELECT
      CodeID,
      MyField,
      MyOtherField,
      (SELECT COUNT(*) FROM myTable t1 WHERE t1.CodeID = t2.CodeID) AS MyRowCount
    FROM
      myTable t2
    

    This is not particularly efficient SQL, so if you are running this on hundreds of thousands of rows or more, I’d go with the first approach.

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

Sidebar

Related Questions

I have a report which has a list that is used to group data
Is it possible to have a report which has grouping on the underlying data
I have a main report which contains user information -- and a subreport that
I have created a report which contains a tablix. I observed that when the
I have a main report which loop over query's data on detail1 band. In
Which web site tracking tools do not have Report Data Sampling? Currently, I'm using
I have a report which is composed of several subreports. I need to render
I have a report which worked perfectly. I inserted a subreport at the top
I have a report which has a tablix within it. What i would like
I have a report which is grouped by location and charge_type with detail information.

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.