ReportViewerWebPart ReportViewerWebPart ReportViewerWebPart Class


Represents the Report Viewer Web Part.

public ref class ReportViewerWebPart : Microsoft::SharePoint::WebPartPages::WebPart, System::Web::UI::IScriptControl
public class ReportViewerWebPart : Microsoft.SharePoint.WebPartPages.WebPart, System.Web.UI.IScriptControl
Public Class ReportViewerWebPart
Inherits WebPart
Implements IScriptControl


You can add the ReportViewerWebPart to a SharePoint application and customize it using its programmatic interface. For example, use the DockToolBar property to programmatically control where the toolbar is displayed. You can control the visibility of individual toolbar items using the ToolBarItemsDisplayMode property.

To supply custom report parameters to the ReportViewerWebPart, use the GetParameters method to see which parameters are available on the report that is currently displayed, then use the OverrideParameters method to supply custom parameter values to the report. To programmatically specify a report path to the ReportViewerWebPart, you can use the ReportPath property.

The ReportViewerWebPart can also consume a report path and report parameters using Web Part connections. Using Web Part connections, an <xref:System.Web.UI.WebControls.IWebPartRow> Web Part can provide a report path to the ReportViewerWebPart, and an IFilterValues Web Part can provide a report parameter to the ReportViewerWebPart.


ReportViewerWebPart() ReportViewerWebPart() ReportViewerWebPart()

Initializes a new instance of the ReportViewerWebPart class.


AsyncRendering AsyncRendering AsyncRendering

Gets or sets a value that indicates whether the report is rendered asynchronously from the rest of the Web page when the Web page is loaded.

AutoGenerateDetailLink AutoGenerateDetailLink AutoGenerateDetailLink

Gets or sets a value that indicates whether to generate a hyperlink that appears above the Web Part. You can click the link to open the report in a new page, in full-page mode.

AutoGenerateTitle AutoGenerateTitle AutoGenerateTitle

Gets or sets a value that indicates whether the Web part title should be automatically generated from the report that is displayed.

DockToolBar DockToolBar DockToolBar

Gets or sets the docking location of the toolbar.

DocumentMapAreaWidth DocumentMapAreaWidth DocumentMapAreaWidth

Gets or sets a string that indicates the width of the document map area.

DocumentMapMode DocumentMapMode DocumentMapMode

Gets or sets an enumeration value that indicates the visibility mode of the document map area.

HyperlinkTarget HyperlinkTarget HyperlinkTarget

Gets or sets the target frame for displaying linked content within the current report.

KeepSessionAlive KeepSessionAlive KeepSessionAlive

Gets or sets a value that indicates whether the ReportViewerWebPart should keep the user session from expiring.

OverflowAuto OverflowAuto OverflowAuto

Gets whether to automatically apply the overflow property to the viewer.

OverrideParameters OverrideParameters OverrideParameters

Gets a collection of ReportParameter objects that are used to override the default parameters for the report that is being loaded in the Web Part.

PromptAreaMode PromptAreaMode PromptAreaMode

Gets or sets a value that indicates the visibility mode of the parameter prompt area and the credential prompt area (if applicable).

ReportPath ReportPath ReportPath

Gets or sets a fully qualified path to a report that is on the current SharePoint site, or on a site within the same Web application or farm.

Title Title Title

Gets or sets the title string of the ReportViewerWebPart.

ToolBarItemsDisplayMode ToolBarItemsDisplayMode ToolBarItemsDisplayMode

Gets or sets a bit flags enumeration value that specifies which toolbar items are displayed when ToolBarMode is set to Full.

ToolBarMode ToolBarMode ToolBarMode

Gets or sets the display mode of the toolbar.


AddParameterProvider(IFilterValues) AddParameterProvider(IFilterValues) AddParameterProvider(IFilterValues)

Specifies the parameter provider Web Part when this Web Part is configured to consume data from that Web Part.

CreateChildControls() CreateChildControls() CreateChildControls()

Creates the child controls of the ReportViewerWebPart.

GetParameters() GetParameters() GetParameters()

Returns the parameters of the current report in the ReportViewerWebPart.

GetToolParts() GetToolParts() GetToolParts()

Returns a list of tool parts that are displayed in the tool pane of the Web-based Web Part design user interface, in the order in which they are displayed.

LoadViewState(Object) LoadViewState(Object) LoadViewState(Object)

Restores view-state information from a previous request that was saved with the SaveViewState() method.

OnInit(EventArgs) OnInit(EventArgs) OnInit(EventArgs)

Raises the Init event.

OnPreRender(EventArgs) OnPreRender(EventArgs) OnPreRender(EventArgs)

Raises the PreRender event.

Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter)

Inherited from T:Microsoft.SharePoint.WebPartPages.WebPart.

RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter)

Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client.

SaveViewState() SaveViewState() SaveViewState()

Saves the view-state of the ReportViewerWebPart.

SetBasePermissionsForSandboxAppDomain(PermissionSet) SetBasePermissionsForSandboxAppDomain(PermissionSet) SetBasePermissionsForSandboxAppDomain(PermissionSet)

Sets the base permissions for the sandbox application domain with the supplied permission set. This method is only applicable when ReportPath is set to a report in a SharePoint document library.

SetRowProvider(IWebPartRow) SetRowProvider(IWebPartRow) SetRowProvider(IWebPartRow)

Specifies the row provider Web Part when this Web Part is configured to consume data from that Web Part.

Explicit Interface Implementations

IScriptControl.GetScriptDescriptors() IScriptControl.GetScriptDescriptors() IScriptControl.GetScriptDescriptors()

Returns a collection of script descriptors.

IScriptControl.GetScriptReferences() IScriptControl.GetScriptReferences() IScriptControl.GetScriptReferences()

Returns a collection of script references.

Applies to