Hi,
I have been running a code to get the report columns dynamically from a sharepoint list.
I query the sharepoint list and get all the columns and rows in a datatable.
Next I use a code to generate the rows and columns dynamically in the report and assign the report to report viewer.
Here is the problem
When I get the column names the columns have encodings for space. I clean the column names programatically and use the datatable to generate the columns and rows dynamically. In this case the report does not show any controls and shows a blank rectangular box with red border.
The report fails to load if I do this cleaning process.
Earlier I had created the report using a static datatable and it worked well. I extended the code to use the exact column names from the sharepoint list. If I directly use the datatable returned by the CAML query for getting all the columns, without cleaning the column heading text, the report shows the columns and rows.
Please let me know if I'm doing something wrong by manipulating the data in the datatable to change the column name.
I have been running a code to get the report columns dynamically from a sharepoint list.
I query the sharepoint list and get all the columns and rows in a datatable.
Next I use a code to generate the rows and columns dynamically in the report and assign the report to report viewer.
Here is the problem
When I get the column names the columns have encodings for space. I clean the column names programatically and use the datatable to generate the columns and rows dynamically. In this case the report does not show any controls and shows a blank rectangular box with red border.
The report fails to load if I do this cleaning process.
Earlier I had created the report using a static datatable and it worked well. I extended the code to use the exact column names from the sharepoint list. If I directly use the datatable returned by the CAML query for getting all the columns, without cleaning the column heading text, the report shows the columns and rows.
Please let me know if I'm doing something wrong by manipulating the data in the datatable to change the column name.