tags:

views:

760

answers:

2

can you please give any sample code for accessing the rdlc elements from code behind file.

I have a text box in the rdlc file, i have to set the value for that from code behind file. Please help me

Thanks

P S Marimuthu

+1  A: 

You can just load the RDLC code as XML using XDocument or XmlDocument or whatever you want, and then query and update the file accordingly as you wish, and then save the RDLC. If you have a value you want to set programatically this way, you can define a hidden report parameter and use the DOM to update that parameter programatically in the same way.

Dave Markle
A: 

this.viewerInstance.LocalReport.SetParameters(new ReportParameter("nombre de tu textbox", "valor que quieres que imprima".ToUpper()));

ociel