Solved

How do I group by every day in the month for SSRS 2005

Posted on 2010-08-25
6
767 Views
Last Modified: 2012-06-27
Hello,
I am trying to create a report so that on the left hand side, it shows me sites and job types.
Along the top, it needs to show me every day of a particular month.
When a site has a job on a particular date, a 1 is in the relevant place.

I can get a matrix to display the dates which have been selected in the database but I need every day of the month.

Could anyone please help.
Thanks
0
Comment
Question by:pstather
6 Comments
 
LVL 16

Expert Comment

by:vdr1620
ID: 33523336
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 125 total points
ID: 33523527
A typical solution to this sort of problem involves using a "calendar" table that is prepopulated with all of the dates you would be interested in, and then linking to that table with an outer join in your SQL statement.
0
 

Author Comment

by:pstather
ID: 33523560
Thanks,
I shall have a look at this tomorrow morning, first thing
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 27

Expert Comment

by:planocz
ID: 33536437
You could also change to a standard table (not Matrix) and setup  your detail row to show all the days of the month per job site and job types by grouping the job site.
0
 

Author Closing Comment

by:pstather
ID: 33536456
This worked wonderfully.
Thanks
0
 

Author Comment

by:pstather
ID: 33565418
The way I did this,
I created a table in SQL with an int. field
I then created a variable in variable in my report query called start day and end day
The start day is 1 and the end day is set through an if statement.
It is either 28, 29, 30 or 31 depending on the month the report is running for.
The date is then set using convert(month, numbefromsql, year).
I used an outer join to match the days together with my data which left me with all the days of the month.
Thanks for your help guys
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question