Monday 7 February 2011

Generate RDLC dynamically with unique column headers

I use the great example from Gotreportviewer since about six month that uses Microsoft Reportviewer and my biggest problem is giving columns titles that different to field names.

There is my solution that has an additional property: List<string> Headers that contains column titles with the following restriction:

Number of headers must be equal to number of columns or TableRdlGenerator throws the following exception:
Error creating report: header and field columns must be set and have to be the same count of elements both of them!

The entire solution can be downloaded from my public folder on skydrive.

2 comments:

  1. hiii
    dynamic columns maintaining is difficult when conditions to be placed in that

    ReplyDelete
  2. How can autogenerate report rdlc when I use dynamic datatable with difference header coloumn?

    ReplyDelete