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 DePosted Dec 9, 2010, 11:37 AM
Thanks.....
Fred TededmondsonPosted Dec 9, 2010, 10:37 AM
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 DePosted Dec 8, 2010, 11:52 PM
Anyway I will check if I find any workaround. Also suggest if you find any workaround, please let us know.
Thanks.....
Sam HobbsPosted Dec 8, 2010, 11:01 PM
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 DePosted Dec 8, 2010, 12:00 PM
Rpt.DataSources.Clear();
Then bind it again....
Thanks