row grouping a column takes all rows of server data (Angular AG Grid) - ag-grid-angular

I am binding server side data to ag grid angular. I have declared rowGroup on one column. The issue is grouping is happening correctly but its taking all the rows.
Example: I want to group on a field called Order.
So if there are 16 rows and each 4 rows will be like:
First 4 rows - Order value: 1,
Second 4 rows - Order Value: 2,
Third 4 rows - Order Value: 3,
Last 4 rows - Order Value: 4,
so the grouping should be on Order column and the related four rows should be grouped under Order column. But this is not happening, in my case its taking all rows and grouping 16 times. Any help would be appreciated. Thanks!

Related

SSRS, return rows into a grid layout

I have a dataset that I need to arrange into a grid on a page (export to pdfs) as a customer report. Each row in my dataset needs to display as a cell. Each page would have roughly 3 records displayed as columns and then 4 rows of records. e.g. a (3x4 grid), being 12 records per page.
Right now I am using a matrix to display my results, but I cannot find how to get my matrix to start a 2nd row after 3 columns are generated.
Is this feasible or should I find a different solution to create these reports?
I was thinking may be if I had row groups to use, but not sure how to create a column that creates a repeating result 3 times then adds 1 to the next 3 results in my query. 111,222,333,444 and that could be my row grouping?
Here's what I use in a matrix to create a grid of columns from a single cell.
Add a ROW_NUMBER field to the dataset query and subtract 1 with the ORDER BY using the field to be ordered by.
ROW_NUMBER()OVER(ORDER BY DISPLAY_NAME) - 1 AS ROW_NUM
Add Calculated Fields to the dataset using the ROW_NUM.
Call the first COLUMN and MOD row_num by 3 to get values or 0 - 2 for the column number:
=Fields!ROW_NUM.Value MOD 3
Call the second calculated field ROW and get the INT of ROW_NUM divided by 3 to get the row number for the record:
=INT(Fields!ROW_NUM.Value / 3)
Then the matrix would have the Column grouping (and sorting) based on the COLUMN field and the Row grouping on the ROW field.
You could use a parameter as the number of columns (3) to make it easy to change.

SSRS Grouping specific rows

Wondering if it is possible to only group specific rows in a tablix as when I add a child group it groups all 3 row of my tablix and I need it to only group the bottom 2.
The tablix does not have a header and I need the top row to be grouped on 2 fields and the next 2 rows to be grouped with the above as well as several other fields
Am I just missing something completely obvious or can this just not be done
This cant be done like you descripe it. But you can use a workaround. You need to mark the rows you dont want to group with a indicator (this can be done in a calculated field) Indicator = {0, 1}. Then you group like you descriped it. The grouping should now look like this:
Value Indicator
1 0 '1st row of group
12 1 '2nd row of group
33 1 '3rd row of group
Now you add a filter to your tablix where you exclude all rows where the indicator value is 0. Then it would look like this:
Value Indicator
12 1 '1st row of group
33 1 '2nd row of group
Of course your indicator needs a expression which identifies the first row per group.

Count number of row results for a row group

How do I group/filter rows and then get total rows for each column. I am going to diagram what the result should be. I don't want to show the actual data. Just the count per column
Out Put should look like this
Column A Column B Column C
Row A - 235 records 300 records 15 records
Row B - 1 record 80 records 900 records
Each column represent a count on the same field but filtered.
So ..
Column A is really Count(MyColumn) WHERE = A
Column B is really Count(MyColumn) WHERE = B
To summarize each row is a grouping + filter and each column is a count based on the number of rows contained in that grouping. No row data needs to be displayed.
You can do this in a table in the group by using the following formula:
=SUM(IIF(Fields!MyColumn.Value = "A", 1, 0))
However, this type of summary report is what a matrix is designed to do. Use the Row field as the row group, the column field as the column group and a Count expression in the intersection and it will do it all for you.

Adding Value Fields in a different data set in SSRS

In this question it answered how to add two different datasets,
SSRS - Expression using different dataset fields
I tried that kind of approach and here is my expression
=First(Fields!count.Value, "remclass1")+First(Fields!count.Value, "db_IACS")
the problem is that only the first value is being Calculated like this
I added the Pulled out COUNT to the Expired Count, i want it to be added per Row
only the first part
For instance:
Column 7 (Count) = Column1(Count) + Column 4 (count) //**per Row**
The value of row 1 column 7 would be column 1 + column 4 row 1
the value of row 2 column 7 would be column 1 + column 4 row 2
The Pulled out table
(Consists of Count, Grams, Principal) are on the data set db_IACS
and the Expired table(Consists of Count,Grams,Prinicipal) are in the dataset remclass1
So any help how to do it? how to add the two columns (in a different dataset)
Thanks :)
You could do this in SQL, as follows:
SELECT db_IACS.count as PulledOut_Count, db_IACS.Grams AS PulledOut_Grams, db_IACS.Principle AS PulledOut_Principle,
remclass1.count as remclass1_Count, remclass1.Grams AS remclass1_Grams, remclass1.Principle AS remclass1_Principle
FROM db_AICS
LEFT OUTER JOIN remclass1 ON db_IACS.Id = remclass1.Id
Then just deal with everything in the one dataset.

Reporting Services: Show top N Rows with Grouping

I am trying to show the top 10 rows in my report. I can do this by setting the following expression for the Visibility of the row group:
=IIF(RowNumber(Nothing) <= 10, false, true)
and then sorting the table on the top numbers.
In my query I get two rows for each result, with different results. The problem is that I want to group these rows into one row in the report without losing the count for top X rows. But when I group on the name in my report in Visual Studio, it only shows every row one time and the count for X rows get incorrect. Sometimes I have the same name once and sometimes twice. I have tried to set the expression to 20 rows, but then I might get 12 rows sometimes and 10 rows sometimes, depending on how many rows for each name my query returns.
Thanks in advance,
Sara
It sounds like you need to top N after you group. Can you group in you query?