Hello, all,
I am having trouble with an issue in an RDLC file. I had to modify the data source it was based on (add a field) and I need to access the new field from the RDLC. The report is complicated and I really don't want to rebuild it, but there doesn't seem to be any way to rebind it to the data set. How is this accomplished?
Thanks!
Loading

Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 8, 2010, 7:00 AM EST
Rpt.DataSources.Clear();
Then bind it again....
Thanks
Sam HobbsRank #107 · 20.5K reputationPosted Dec 8, 2010, 6:01 PM EST
A RDLC file is a XML file so if you are desperate you could try editing the RDLC file as XML but I suggest hunting aroud in design view and trying to use the documentation. I am not however confident that the answer is easy to find in the documentation either; Microsoft probably thinks it is so easy that you don't neeed documentation.
Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 8, 2010, 6:52 PM EST
Anyway I will check if I find any workaround. Also suggest if you find any workaround, please let us know.
Thanks.....
Fred Tededmondson12 reputationPosted Dec 9, 2010, 5:37 AM EST
I can see how Subhendu's suggestion for runtime could be used to react to the situation by dynamically reattaching and getting what I need to get done from there, although it would have been an unholy pain (the extra field is being used to set visibility on other fields, so not having a strongly-typed reference and finding all that stuff in the report object would have been _awful_).
I can't believe there is no way to get back to that data sources dialogue, but that's surely the way it seems.
I eventually did edit the XML for the RDLC. It wasn't as bad in there as I thought, and it worked just fine. I just had to add an additional
Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 9, 2010, 6:37 AM EST
Thanks.....