ReportViewer - Changing the Local Report
-
Hi, I have a number of reports, one for each question on a questionnaire. They're all supposed to be pie charts and show the results as a "Yes"/"No" split. Rather than write a separate report for each question, I'd like to create one report called (for example), "generic.rdlc". I would then load this report and dynamically set a data-source to it. All I'd then have to do is change or set the column name to report on. Can anyone suggest a way of doing this? The report .rdlc format appears to be a basic XML file and I can find where to set the column, so I guess I could write the column name to the file before I load it. Is that really the best way to do it though? Is there not an API method I can use to "poke" a value into the report? Incidentally, I'd also like to set the name of the report so I can title it appropriately - again, surely I shouldn't have to write this value to the report file directly? Thanks for any help offered :)