ReportViewerWebPart Class

Definition

Represents the Report Viewer Web Part.

public ref class ReportViewerWebPart : Microsoft::SharePoint::WebPartPages::WebPart, System::Web::UI::IScriptControl
[System.Xml.Serialization.XmlRoot(Namespace="urn:schemas-microsoft-com:SqlServerReportViewer")]
public class ReportViewerWebPart : Microsoft.SharePoint.WebPartPages.WebPart, System.Web.UI.IScriptControl
[<System.Xml.Serialization.XmlRoot(Namespace="urn:schemas-microsoft-com:SqlServerReportViewer")>]
type ReportViewerWebPart = class
    inherit WebPart
    interface IScriptControl
Public Class ReportViewerWebPart
Inherits WebPart
Implements IScriptControl
Inheritance
Microsoft.SharePoint.WebPartPages.WebPart
ReportViewerWebPart
Attributes
Implements

Remarks

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 <xref:Microsoft.SharePoint.WebPartPages.IFilterValues> Web Part can provide a report parameter to the ReportViewerWebPart.

Constructors

ReportViewerWebPart()

Initializes a new instance of the ReportViewerWebPart class.

Properties

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

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

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

DockToolBar

Gets or sets the docking location of the toolbar.

DocumentMapAreaWidth

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

DocumentMapMode

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

HyperlinkTarget

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

KeepSessionAlive

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

OverflowAuto

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

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

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

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

Gets or sets the title string of the ReportViewerWebPart.

ToolBarItemsDisplayMode

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

ToolBarMode

Gets or sets the display mode of the toolbar.

Methods

AddParameterProvider(IFilterValues)

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

CreateChildControls()

Creates the child controls of the ReportViewerWebPart.

GetParameters()

Returns the parameters of the current report in the ReportViewerWebPart.

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)

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

OnInit(EventArgs)

Raises the Init event.

OnPreRender(EventArgs)

Raises the PreRender event.

Render(HtmlTextWriter)

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

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()

Saves the view-state of the ReportViewerWebPart.

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)

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

Explicit Interface Implementations

IScriptControl.GetScriptDescriptors()

Returns a collection of script descriptors.

IScriptControl.GetScriptReferences()

Returns a collection of script references.

Applies to