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.

 All Forums
 Development Tools
 Reporting Services Development
 Complex Matrix column data with different data typ

Author  Topic 

sumanshivakoti
Starting Member

2 Posts

Posted - 2010-10-15 : 15:01:01
I have a data like this

drop table #table
select 34 as A,17948 as B,0.19 as C,19 as D,16145 as E,'Jan' as Period into #table
Insert into #table
select 26 as A,14206 as B,0.18 as C,19 as D,13411 as E,'Feb' as Period
union all
select 38 as A,13037 as B,0.21 as C,18 as D,14974 as E,'Mar' as Period
select * from #table

From this #table i want the view as below format and is doable thru matrix report option in SSRS,but the problem i am running is that i cannot get in this type of data type format. If you look into it,i have column with header 'Jan' and it has data in different data type e.g money,number,percentage. I need to maintain this data type in order to do the calculation after it generates the report on excel spreadsheet. If i use the varchar for the column, it is not usable to me in the final report and i cannot do the calcualtion. Any workaround will be highly appreciated.

Jan Feb Mar
A $34 $26 $26
B 17,948 14,206 13,037
C $0.19 $0.18 $0.21
D 19% 19% 18%
E $16,145 $13,411 $14,974
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-17 : 04:58:13
why dont you bring it as varchar itself and in report apply appropriate format specifiers?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sumanshivakoti
Starting Member

2 Posts

Posted - 2010-10-19 : 23:40:35
when you bring the data as varchar and export to excel, you cannot use the format specifier to change the data type
Go to Top of Page
   

- Advertisement -