SSRS Not Printing All Records for Dataset, but Counts Them - reporting-services

I have an SSRS report (see image) that looks for open discipline reports. When I run the SSRS Dataset query from SSMS, it outputs 19 records. When I print it through SSRS it only outputs 17 records, but shows a total count of 19. In the image below I've shown the report layout, partial SQL (SSMS) results, and the section of the SSRS Report with the two missing records (107 - Gore). I see that the case numbers for Gore are all NULL, but I'm not calling distinct anywhere that I know of, and the records themselves are not duplicates (different dates). I'm really puzzled at how SSRS can get the total right, but skip records at the same time. Printing the report and physically counting the records gives 17 records. Any ideas?

Original programmer had duplicate case numbers showing, and use a row group to hide them. I fixed this in the code. But when the case numbers for different cases were all null, the code was pulling them correctly but the row group was filtering out more than one null. People, fix things where they're broken, don't patch.

Related

SSRS Report only returns a single row of output instead of multiple pages of output

I am looking to build a report in SSRS that has 3 columns, similar to the data below.
The query behind the report returns a single row for every field in the 3 columns.
The report returns 20 rows for example, with 50 fields each pertaining to the elements outlined below.
However when I view the report I only see the first rows output. I need to create the elements in very particular positions and don't want to use tables and concatenate fields. I need a flat report 8.5 x 11 with elements in specific positions.
How do I fix the grouping so the report returns every row sent from the query.
There is no table, no groups. Only a single page with elements on it.
Please advise.

Report builder 3.0 Using Reportitems!TexboxXX.Value sometimes creates multiple boxes. Why?

I have 6 Datasets each one is the same query but has a different WHERE clause based on employee type. They generate 6 tables. At the top of the report there is a summary table which uses reportitems!textboxXX.value to grab the totals for 2 particular fields from all the tables. I'm also using a StartDate and EndDate parameter. Each reportitems! expression in the table comes from a different dataset in the report if that is relevant.
When I run the report using dates from yesterday back to the 9th of May I get the desired output.
But when I go to the 8th I get multiple rows all the same.
and as I go even further back I get even more rows of the same information. To my knowledge nothing interesting or different happened on the 8th of May and the tables further down the report look exactly the same. Any idea what might be causing this? The design view looks like this if that helps. There's no grouping or filters on the table.
Still not certain about the mechanics behind this but I found a 'solution' so I figured I'd post it. I just made a new dataset for my summary tables where the query was simply SELECT 1. Now I get a single row every time.

SSRS SUM of Header rows

I know there are a number of similar questions on here which I've looked at but I can't quite find one the same as my particular issue.
I have the following report built in SSRS (looking at a Dynamics 365 instance, so I believe SSRS version is 2016 but if not then it should be modern), and the yellow fields at the bottom are supposed to be a sum of the blue header rows throughout the rest of the report, but as you can see they are incorrect. I am using exactly the same syntax as I am for the other fields in white on the row that do sum correctly, so I don't understand why it's only these 3 I'm having issues with.
I have the following 2 groups set up:
The expression for my Budget Days sum is simply:
=FormatNumber((SUM(Fields!task_msdyn_effortValue.Value)/8),2)
The other fields are the same concept, a simple sum of the values. Based on another question here, I tried adding in the name of the ProjectTask group to the expression as I believe it's summing up all the rows in the report but this gives an error about scope so perhaps my group is set up incorrectly?
Any help much appreciated.

Need the exact # of rows in SSRS report

I have a report that I work with in Visual Studio 2013.
The Dataset Query for the report returns about 1,000 rows of data [I run it in SSMS].
The only Row Group is the report is "Details".
Because of a 3-level grouping in the Details Group, the number of rows actually showing on the report is 400.
How can I get the actual count of Rows in the report to display?
I have tried suggestions from other threads on the forum - but I always end up with the number of rows that the Dataset returns - not the number of rows that are actually on the report.
Is there a way to get a count of the rows on the report rather than the count of rows that the underlying Dataset returns?
Thanks!!
Add row count to your sql and have the ssrs pick up your max row_number value.
I run SQL developer for most of my testing before I drop it into SSRS. It' not Visual Studio but how I would do it may help you.
Select row_count() over (order by [unique value in row]) ROW_NBR, existing row information from tables where ...
Then in SSRS enter this in your cell
=MAX(ROW_NBR, "DataSet1")
OR!!!!
just use this
=Count([value in existing code], "DataSet1")
Widening the scope of the count to your entire dataset will give you a count of all values in the dataset
Use CountRows.
Returns a count of rows within the specified scope.
=CountRows("DataSet1")

How to display average in an SSRS table?

I am using SSRS 2008 and one of my rows is supposed to return the average of a certain field. But currently it just displays all of the rows instead of one row with the average. How do I implement this?
Currently the stored proc for this RDL file returns all of the records. So I tried using the "Avg(<field value>)" function in SSRS for the SSRS expression. And then I grouped this row on the <field value>. I removed filtering so it should average all rows now.
I'm guessing the cause is the grouping. Any ideas though?
I think you need a totals row. Right-click on the group and then Add Totals Then you should be able to put your Avg(<field value>) in that cell.