Solved

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

Posted on 2010-08-25
6
761 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
Comment Utility
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 125 total points
Comment Utility
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
Comment Utility
Thanks,
I shall have a look at this tomorrow morning, first thing
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 27

Expert Comment

by:planocz
Comment Utility
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
Comment Utility
This worked wonderfully.
Thanks
0
 

Author Comment

by:pstather
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now