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 |
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2010-03-25 : 08:10:43
|
Hello Experts,I need a help in reports, actually i have made a matrix report in whichi need to display column dynamically based upon the selection parameter.I have a selection paramter of date.If i select Date on selection paramater as "03/01/2010" i.e. 1st March 2010then it should display column as week wise up to 2 monthslike :-1st March - 7th March 8th March -14th March 15 March - 21 March ....Up to 2 monthThen i have to display sales Amount week wise in that.So based upon the sales date it display amount in respective column.If sales date is 9th april then its should come under 2nd column.If any sales date comes after 2 month then there should a column like May Onward, and we need to display amount in that.Its should be dynamically changed based upon that date parameter selection.Please help me to how to perform it.Regards,Abhi |
|
klsrao
Starting Member
4 Posts |
Posted - 2010-04-13 : 23:45:49
|
Abhi,I understood from your post that the user can select any date. from that date we keep displaying for 7 days data in one column upto 2 months (8 columns).1) based on start date, you need to filter 2 months data.2) you need to add a week date column and add start of week based on start date as mentioned by you (1st March - 7th March 8th March -14th March 15 March - 21 March ....Up to 2 month)3) group on WeekDate column in the report. take the weekdate as column in your matrix report.Hope this helps you.Learn how not to speak negative. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-14 : 00:19:47
|
you need to group on week for data between passed values of @startdate and @startdate + 2 months. then for each week take start and end date and concatenate them in your reqd format. And you should be using this field for column grouping of your matrix.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|