I've added Report Viewer Web Part to page with report path URL.
Now I just want to get that Report Viewer Web Part from SharePoint page and change its report path URL property programmatically using c# or jquery.

Can anybody know How to achieve this? thank you.

  • see this link: msdn.microsoft.com/en-us/library/… . private static void GetWebParts() { using (SPSite site = new SPSite("<YOUR SITE URL>")) { using (SPWeb web = site.OpenWeb()) { SPFile file = web.GetFile("default.aspx"); using (SPLimitedWebPartManager wpm = file.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)) { foreach (WebPart wp in wpm.WebParts) { Console.WriteLine("Web part: {0}", wp.Title); }}}}} – userAZLogicApps Dec 22 '15 at 12:13
  • Get the report viewer web part title using the GetLimitedWebPartManager API as the first part. – userAZLogicApps Dec 22 '15 at 12:15
  • Thanks SaMolPP for reply. Yes I'm able to get my report viewer web part using SPLimitedWebPartManager class. But the problem is that how to change its report path URL? – SP Developer Dec 23 '15 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.