Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
powersakthi
Starting Member
9 Posts |
Posted - 2007-12-08 : 00:28:04
|
Hi Team,Please take a look at this table structure[url]http://www.driveway.com/okpdw28716[/url] [Dont worry i'm not spammer this link is a free online storage site...] or the INFORMATION_SCHEMA of this table at [url]http://www.nopaste.com/p/a3LcjdWRN/txt[/url].Here i have the everyday entry for a project. For example we are manufacturing Gears for car,truck then we will have different project name for car and truck. Inside for car gear there will be different models which call it as partnumber. So if car gears are of 3 models then 3 partnumber for carproject.Now our planner will everyday update this table on how many gears we planned for each project and each partnumber and how much we have actually produced against the plan and how much we shipped.At the end of the week or month or year, the management will use this reporting service to generate a report similair to this excel sheet [url]http://www.driveway.com/nkjde55107[/url] which currently they are doing manually. Here we can group all the month together and see the overall report and if needed we can expand the group for one month and see the week grouped data and if needed we can ungroup one week and see the daywise data.Now with this single table i need to make a report in SQL reporting server which all the project will be grouped based on the monthwise and then if they untree the month then week group then after untree a week the day wise data.Please take a view at my current report [url]http://www.driveway.com/qlkdz20103[/url]. The issue i'm facing is i'm not able to run all the three level queries as a single query but since the structure has to be maintained even after the data is exported to excel sheet all the three queries for monthly summary and weekly summary and daily summary has to done at one query. I tried the below structure in the reporting server [url]http://www.driveway.com/ilodv63849[/url]. Please find the query i tried till now [url]http://www.nopaste.com/p/aeYqdWS5I/txt[/url]. I'm not able to get how to get the grouping to match the excel grouping. Can anyone guide me.... |
|
|
|
|