4

I am working on a project of RDLC report in which I have took tablix and bind the table's columns with dataset that I have added in my RDLC report.

Everything is working fine, but the interesting thing is my reports are customizable.

Let's suppose we take the example of Student report.

For Student report we have 4 columns like: RollNo, FName, LName, Class.

For Student report we have the dataset dsStudent.

My reports will look like:

RollNo     FName      LName     Class
1          A          B         I
2          C          D         II
3          E          F         III

The above is absolutely good, but as I said my reports are customizable means the user can change the order of columns.

He can choose the order of columns like: FName, LName, Class, RollNo

So my Report will look like:

FName    LName    Class    RollNo
A        B        I        1
C        D        II       2
E        F        III      3

That's where I am stuck, I am unable to show my report's columns dynamically as I have already fixed the column's order by binding with the dataset dsStudent.

Please help me out. Thanks in advance.

garvit gupta
  • 301
  • 3
  • 18

1 Answers1

0

Hi buddy if your columns are dynamic in the dataset then there is no such optio n in SSRS. But I can give you a hint like when you edit and SSRS it would like XML.

Keeping that in mind you can construct the entire structure of the dataset as an RDLC file from your code.

To be specific you need to generate RDLC file during runtime. Use the some common template and replace the template place holders with column value's

Personally I assure you it won't take much time to export the data. But you should put some effort to achieve this. I'm telling this solution from my past experience. I have done something like this :)

Feel free to ask if you need more information. But don't ask code.