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 |
huynhtl
Posting Yak Master
107 Posts |
Posted - 2008-12-05 : 13:56:41
|
Is there a way to have matrix data format to show up regardless if there's not data in it? I have two matrix in one report that have lname in row, age in column (child, adult), $$ in data and the parament base on month. I would run my report and click on month, and certain have child and adult to show up, but certain month doesn't. This is what showing up right now:matrix1Lname Adult Children TotalSmith 21 5 $50Jones 35 10 $150Miller 99 7 $300matrix2Lname Adult TotalJames 60 $15Gosebe 75 $35 West 35 $75This is what I want:matrix1Lname Adult Children TotalSmith 21 5 $50Jones 35 10 $150Miller 99 7 $300matrix2Lname Adult Children TotalJames 60 $15Gosebe 75 $35West 35 $75 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-05 : 23:35:39
|
this needs to done at your query end. Matrix being dynamic renders the columns based on your data. so if data for prescribed period doesn't have some values (like Children in above case), you wont get that column in matrix. so for getting it, you need to have a master table containing the column group values (Children ,Adult,...) and using it take left join with current tables. this will ensure you will get column values regardless of data and get values as 0 in case you dont have data. |
|
|
huynhtl
Posting Yak Master
107 Posts |
Posted - 2008-12-08 : 11:17:05
|
Perfect! Thanks..... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-09 : 03:23:46
|
welcome |
|
|
|
|
|