SSRS displaying data in a table when grouped by year - sql-server

The below image shows the table in design view followed by how it looks when run. My problem is that if you look for example under the first 'Service' listed for February, there is a line for 2010's data then a separate lower line for the 2011 data.
I need the table to make use of the one line for that particular Month rather than splitting the data.

Found out that I needed to right click on Details in row groups and add my month field to use one row.

Related

Measure that shows the oldest product in the table - DAX

DAX is still a little bit confusing and new for me and that's why I'm looking for your help.
I have a very simple table that shows the products that are in the production line. It contains 3 columns: One is for the product name, the other one contains the date in which the product went to the production line and the last one, the amound.
All I want is to show in a dashboard in Power BI the first product that still is in the production line. In another words, I want a measure that calculate the oldest date in my table and return the following product (or products ) related to that date.
One solution is to show a table sorted by the date but it is not really what I'm looking for.
Thanks in advance

SSRS - Group Columns Together

All:
I have the following data (see Raw Data attachment). Inside my SSRS Report, I have a column for "Name / Stream / Offer One / Offer Two" (Name is the column for the "Value" column shown in the image).
I need my SSRS Report to display one row of the "totals" for each Name. Then under this, I need a row for each Stream associated with the Name that displays the values for that stream.
For the SSRS Output (please see second screen shot). The data loads into my tablix, but I need one row for "BAG-CV" that displays the total for that Name. Then under this row, I need a row for "AR" stream with the data for.
If you see Name: JAC-FL, it has 5 streams listed under it. So I would need one row for the total of JAC-FL, then 5 rows under it listing all the streams associated with this name.
Hopefully this makes sense.
The concept that you are describing is a nested parent/child group (two levels of grouping in a single table). This is quite easy to do and I'll walk you through the steps for your particular scenario thanks to the helpful description and screenshots that you posted.
Create table: I would advise always starting with the innermost grouping and building the table outwards. In your case, the lowest data granularity is Stream/Offer1/Offer2 as these are displayed as raw details with no aggregation:
Add Parent Group For "Name": Click on the group at the bottom (or in the table) and add a parent group to the current table details group, making sure to include a group header (for the sum):
Screenshot #1:
Screenshot #2:
Add Fields: Add the additional fields to your table, ensuring that the middle row is using SUM aggregation as per the screenshot:
Results: You should see the additional header row on the parent group with the desired SUM.
Cleanup: The example above just creates the most basic and bare functionality. I would suggest cleaning it up and adding a visibility toggle on the details group:
PS. I realize you probably aren't in control of the database schema, but wow, exclamation marks in column names would drive me up the wall :)

Form with Subform - find record by updating one of two fields

step by step i am advancing with my Gasoline inventory database and it is actually about to start becoming fun to try out different new things on the database.
However i got stuck on one little issue.
I have a form with a Subform.
May main form has two fields. One is the Gas Station and one is the date of the report that comes in.
Each report of any station contains one or more products with gallons sold, delivered and physical inventory (has to be applied manually as gas expands when warm)
I tried to add a macro to each of the two fields which requeries after update, but that didn't do anything.
Anyways, im looking for a solution that lets me look for past records by just updating one of the two fields in the main form.
I guess you have a table containing the Station details - Station ID, Station Name, etc. Something like the image below.
You'll also have a table or query that shows sales, delivery, etc for each station based on the Station ID (it'll also have a report date - forgot to add that to my example table).
When you place the subform into the main form you need to link the two forms so they stay in sync using the Master/Child fields (your StationID) which are available in the property sheet for the subform container:

Dynamically add columns in SSRS

I am tasked with creating a report in SSRS that can display data covering anywhere from 1 week up to 52 weeks.
What I am trying to avoid is writing a huge query that will pull all 52 weeks worth of data and have it show on the report, unless the user wants that data to appear.
So if the user wants January 1st - February 1st it will only show 6 columns of data instead of all 52 columns. How would I do something like that?
Easy - you need to use a Matrix.
A grid gives you a fixed number of columns and many rows.
A matrix gives you many columns and many rows.
Try this How to Create SSRS Report with Dynamic Columns
Create column grouping on your tablix, for example you have column WEEK and you are bringing data from 1st Jan to 1st Feb.
Column grouping on column WEEK will generate only 5 columns if you have data for every week.

Repeat non-pivot column in SSRS

Referring to the image, I would like to repeat the salesagent column after every few rows. How do I do this in SSRS?
Note: My report will have a start and end date parameter for customers to choose. I will be using the date column for pivoting purposes. If a customer chooses to run the report for six months, they will have plenty of date columns so they are requesting to repeat the non-pivoted header column every seven days/column. Is it possible?
Let me know if more information is needed from me.

Resources