1
votes

I have a stored procedure that runs as the backend of an SSRS report. The store procedure will have current month Id as input and it runs for everyday and enlist the process of all. Resultant report will have No of days as rows and no of process at column. Process count will be dynamic so as no of days. i.e Jan will have 31 rows and Feb will have 28.

Though rows are not the issue. but we can't get the dynamic column and and values in SSRS even with Matrix.

May be we are missing any step but we have taken one matrix in which we set group by process in column group and days as row group. but it repeats only one value in every column.

enter image description here

We need to display only those column which are used for this month only.

It is just like following. we need to display only those column which are applicable so dynamic table and dynamic column need to generated in SSRS.

enter image description here enter image description here

1
What does your data set returns? Paste few rows from the data set.Hatim Stovewala
I am generating the same dt as it showing in images.. I dynamic generate temp table with 4-5-6 columns as per data. null columns doesn't get generated.Ketan Kotak

1 Answers

0
votes

You should be able to change the column property to display or hide each column based on whether or not data is present in that column. For example if you have columns A, B, C, and D, you can add an expression to the display property of column D something like (pseudocode, I don't remember SSRS right now):
[code]=if(Dataset(mydata).First.colD.value is null,1,0)[/code]

That would hide the column if there is null data as the first row in column D. Someone can probably help flesh out the real expression.