Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
662 views
in Technique[技术] by (71.8m points)

sql - How to make a column invisible in an ssrs matrix

I have an ssrs matrix , the design of which looks like this :

enter image description here

The sql query used in the above dataset looks like this :

select [YEAR], [MONTH] as MONT , ProductName, NumberofSales from XYZ ;

When the report is run , My output looks like this :

enter image description here

Here , the Column Names 9 , 10 correspond to the months 9 - September and 10 - October.

Change shows the difference in numbers between the month and the previous month . example : number of sales in october - number of sales in september.

I would like to remove the column that I have circled in the above picture . Could you please let me know how I can do this . ??

I already tried right clicking the Change column and changing the visibility property, by adding an expression to look soomething like this :

=(Parameters!UserSelectedDate.Value=Fields!MONT.Value)

But that gives me an entire blank space for the Change column like this :

enter image description here

But I do, not want to see the blank space. I would like to remove the column completely. Please let me know if it is possible.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I don't know, why it shows blank space, but here is how I handled this problem:

  1. Choose "column visibility" property of column "Change" enter image description here
  2. Then I added expression for hiding column: =IIF(Month(Fields!Date.Value)=Parameters!UserSelectedDate.Value,True,False)

And when I select report parameter to 1 and preview the report, it hides Change column for month 1: enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...