IReportViewerBuilder
Represents a builder that provides a fluent API for configuring and initializing the MVC Report Viewer. Used to set up all aspects of the report viewer including report sources, display options, authentication, and client-side behavior.
Definition
Namespace:Telerik.ReportViewer.Mvc
Assembly:Telerik.ReportViewer.Mvc.dll
Syntax:
public interface IReportViewerBuilder
Methods
Sets the key mappings used in accessibility mode for keyboard navigation.
IReportViewerBuilder AccessibilityKeyMap(AccessibilityKeyMap keyMap)
The AccessibilityKeyMap configuration object defining keyboard shortcuts and navigation keys.
Returns:The current IReportViewerBuilder instance for method chaining.
Customizes keyboard shortcuts for accessibility navigation to meet specific application or user requirements.
Sets the encoded authentication token used to authenticate requests to the reporting service.
IReportViewerBuilder AuthenticationToken(string token)
The encoded authentication token string for secure communication with the reporting service.
Returns:The current IReportViewerBuilder instance for method chaining.
Used for secured reporting services that require authentication tokens for request authorization.
Sets the CSS class to be applied to buttons when they are in checked state.
IReportViewerBuilder CheckedButtonClass(string checkedButtonClass)
The CSS class name for styling checked/pressed buttons in the viewer interface.
Returns:The current IReportViewerBuilder instance for method chaining.
Allows customization of checked button appearance to match application styling requirements.
Provides a fluent way to configure the client-side event handlers of the report viewer.
IReportViewerBuilder ClientEvents(Action<IClientEventsBuilder> clientEventsBuilder)
An action delegate that receives an IClientEventsBuilder for configuring event handlers.
Returns:The current IReportViewerBuilder instance for method chaining.
Enables attachment of JavaScript functions to handle various viewer events such as rendering, printing, and user interactions.
Defers the JavaScript initialization statement for the report viewer.
IReportViewerBuilder Deferred()
The current IReportViewerBuilder instance for method chaining.
Allows manual control over when the viewer initialization script is executed for custom loading scenarios.
Sets whether the viewer should use the browser's Adobe PDF plug-in for the print action.
[Obsolete("Telerik.ReportViewer.Mvc.IReportViewerBuilder.DirectPrint(bool) is now obsolete. Please use Telerik.ReportViewer.Mvc.IReportViewerBuilder.PrintMode(Telerik.ReportViewer.Mvc.PrintMode) overload instead.")]
IReportViewerBuilder DirectPrint(bool directPrint)
True to enable direct PDF plugin printing, false to use alternative print methods.
Returns:The current IReportViewerBuilder instance for method chaining.
Sets the CSS class to be applied to buttons when they are in disabled state.
IReportViewerBuilder DisabledButtonClass(string disabledButtonClass)
The CSS class name for styling disabled buttons in the viewer interface.
Returns:The current IReportViewerBuilder instance for method chaining.
Allows customization of disabled button appearance to match application styling requirements.
Specifies where the Document Map Area should be displayed. Right - Displays Document Map Area on the right of the page view. Left - Displays Document Map Area on the left of the page view.
IReportViewerBuilder DocumentMapAreaPosition(DocumentMapAreaPosition documentMapAreaPosition)
The DocumentMapAreaPosition enumeration value specifying the position: Right or Left relative to the page view.
Returns:The current IReportViewerBuilder instance for method chaining.
Controls the placement of the document map navigation panel for report bookmark and section navigation.
Sets the initial visibility state of the viewer's document map.
IReportViewerBuilder DocumentMapVisible(bool visible)
True to show the document map by default, false to hide it initially.
Returns:The current IReportViewerBuilder instance for method chaining.
Controls whether the document map navigation panel is visible when the viewer first loads. The document map is shown only if the report contains bookmarks. The document map works both in the interactive and print preview view modes.
Enables or disables the accessibility features of the report viewer and its contents.
IReportViewerBuilder EnableAccessibility(bool enable)
True to enable accessibility features for screen readers and keyboard navigation, false to disable them.
Returns:The current IReportViewerBuilder instance for method chaining.
Accessibility features include ARIA attributes, keyboard navigation support, and screen reader compatibility.
Sets the unique identifier for the MVC Report Viewer HTML element that will be used by the initialization script to locate and initialize the viewer.
IReportViewerBuilder Id(string id)
The unique HTML element identifier string that will be assigned to the report viewer container.
Returns:The current IReportViewerBuilder instance for method chaining.
This identifier is required for proper viewer initialization and must be unique within the page HTML structure.
Sets the background image URL for the PageArea when parameter values are missing or invalid.
IReportViewerBuilder InitialPageAreaImageUrl(string initialPageAreaImageUrl)
The URL of the background image to display in the page area during initial state or parameter validation errors.
Returns:The current IReportViewerBuilder instance for method chaining.
Provides visual feedback to users when the report cannot be displayed due to missing or invalid parameters.
Sets whether the client session will be kept alive by sending periodic requests to prevent session timeout.
IReportViewerBuilder KeepClientAlive(bool keepClientAlive)
True to send keep-alive requests based on ClientSessionTimeout configuration, false to allow natural session expiration.
Returns:The current IReportViewerBuilder instance for method chaining.
Prevents client session expiration during extended report viewing sessions by maintaining server communication.
Specifies whether the viewer is in Continuous scroll or Single page mode. SinglePage - Displays only one report page in PageArea container ContinuousScroll - Displays large amount of report pages by appending additional pages on demand.
IReportViewerBuilder PageMode(PageMode pageMode)
The PageMode enumeration value: SinglePage for one page display, or ContinuousScroll for multiple pages with on-demand loading.
Returns:The current IReportViewerBuilder instance for method chaining.
SinglePage shows only one report page at a time, while ContinuousScroll enables scrolling through multiple pages with progressive loading.
Provides a fluent way to configure custom parameter editors for the report viewer.
IReportViewerBuilder ParameterEditors(Action<IParameterEditorsBuilder> parameterEditorsBuilder)
An action delegate that receives an IParameterEditorsBuilder for configuring custom parameter input controls.
Returns:The current IReportViewerBuilder instance for method chaining.
Enables replacement of default parameter input controls with custom JavaScript-based editors for enhanced user experience.
Configures the report parameters display and interaction options.
IReportViewerBuilder Parameters(Parameters parametersOptions)
The Parameters configuration object that defines parameter area behavior and appearance.
Returns:The current IReportViewerBuilder instance for method chaining.
Controls how report parameters are displayed and managed within the viewer interface.
Specifies where the Parameters Area should be displayed. Right - Displays Parameters Area on the right of the page view. Left - Displays Parameters Area on the left of the page view. Top - Displays Parameters Area on the top of the page view. Bottom - Displays Parameters Area on the bottom of the page view.
IReportViewerBuilder ParametersAreaPosition(ParametersAreaPosition parametersAreaPosition)
The ParametersAreaPosition enumeration value specifying the position: Right, Left, Top, or Bottom relative to the page view.
Returns:The current IReportViewerBuilder instance for method chaining.
Controls the placement of the parameters panel for optimal user experience and interface layout.
Sets the initial visibility state of the viewer's parameters area.
IReportViewerBuilder ParametersAreaVisible(bool visible)
True to show the parameters area by default, false to hide it initially.
Returns:The current IReportViewerBuilder instance for method chaining.
Controls whether the parameters panel is visible when the viewer first loads, regardless of parameter presence.
Sets whether the viewer's client session should be persisted between page refreshes using browser sessionStorage.
IReportViewerBuilder PersistSession(bool persistSession)
True to enable session persistence across page refreshes, false to use default session behavior.
Returns:The current IReportViewerBuilder instance for method chaining.
Session persistence maintains viewer state during postbacks and page refreshes for improved user experience.
Sets the print mode of the viewer. Three modes exist currently: AutoSelect - Specifies that the viewer should automatically determine how to print: through the browser's PDF plug-in or through export to a PDF file. ForcePDFPlugin - Specifies that the viewer should always use the PDF plugin regardless of the browser's version and settings. ForcePDFFile - Specifies that the viewer should always export the report document to PDF format with the 'print' script enabled.
IReportViewerBuilder PrintMode(PrintMode printMode)
The PrintMode enumeration value: AutoSelect for automatic method selection, ForcePDFPlugin for PDF plugin usage, or ForcePDFFile for PDF file export with print script.
Returns:The current IReportViewerBuilder instance for method chaining.
Controls the printing mechanism based on browser capabilities and user requirements for optimal print experience.
Sets the chain of report resolvers for custom report loading logic.
[Obsolete]
IReportViewerBuilder ReportResolver(IReportResolver resolver)
The IReportResolver implementation for custom report resolution.
Returns:The current IReportViewerBuilder instance for method chaining.
Sets the connection data for the Telerik Report Server that hosts the reports.
IReportViewerBuilder ReportServer(ReportServer reportServer)
The ReportServer configuration object containing connection and authentication information for Report Server integration.
Returns:The current IReportViewerBuilder instance for method chaining.
Used when the viewer is connected to a Telerik Report Server instance (takes precedence over the ServiceUrl property) Connecting to Telerik Report Server for .NET is not supported.
Sets the ReportSource for the report displayed in the viewer.
[Obsolete]
IReportViewerBuilder ReportSource(ReportSource reportSource)
The report source configuration object.
Returns:The current IReportViewerBuilder instance for method chaining.
Sets the report source as a string identifier and provides parameter values for the report displayed in the viewer.
IReportViewerBuilder ReportSource(string report, IDictionary<string, object> parameters)
The string identifier or path that uniquely identifies the report to be loaded.
parametersIDictionary<string, object>The IDictionary<TKey, TValue> containing parameter name-value pairs for report initialization.
Returns:The current IReportViewerBuilder instance for method chaining.
Combines report identification with parameter initialization for streamlined report setup with predefined values.
Sets the report source as a string identifier for the report displayed in the viewer.
IReportViewerBuilder ReportSource(string report)
The string identifier or path that uniquely identifies the report to be loaded.
Returns:The current IReportViewerBuilder instance for method chaining.
Simplified method for specifying reports using string-based identification without additional configuration.
Sets the report source as a TypeReportSource for the report displayed in the viewer.
IReportViewerBuilder ReportSource(TypeReportSource typeReportSource)
The TypeReportSource configuration that references a report class type for strongly-typed report loading.
Returns:The current IReportViewerBuilder instance for method chaining.
Used for reports that are implemented as .NET classes and referenced by their type information.
Sets the report source as a UriReportSource for the report displayed in the viewer.
IReportViewerBuilder ReportSource(UriReportSource uriReportSource)
The UriReportSource configuration that references a report file by its URI location.
Returns:The current IReportViewerBuilder instance for method chaining.
Used for reports stored as files that are referenced by their file system or web URI location.
Sets the zoom scale factor for the report display when using Specific scale mode.
IReportViewerBuilder Scale(double scale)
The scale factor as a decimal value where 1.0 equals 100% (original size), values greater than 1.0 zoom in, and values less than 1.0 zoom out.
Returns:The current IReportViewerBuilder instance for method chaining.
Only effective when ScaleMode is set to Specific, allowing precise control over report magnification.
Sets the scale mode of the viewer. Three modes exist currently: FitPage - The whole report will fit on the page (will zoom in or out), regardless of its width and height. FitPageWidth - The report will be zoomed in or out so that the width of the screen and the width of the report match. Specific - Uses the scale to zoom in and out the report.
IReportViewerBuilder ScaleMode(ScaleMode scaleMode)
The ScaleMode enumeration value: FitPage for full page fitting, FitPageWidth for width-based fitting, or Specific for custom scale values.
Returns:The current IReportViewerBuilder instance for method chaining.
Determines how the report is sized within the viewer area to optimize readability and user experience.
Sets the scale mode of the viewer. Three modes exist currently: FIT_PAGE - The whole report will fit on the page (will zoom in or out), regardless of its width and height. FIT_PAGE_WIDTH - The report will be zoomed in or out so that the width of the screen and the width of the report match. SPECIFIC - Uses the scale to zoom in and out the report.
[Obsolete("Telerik.ReportViewer.Mvc.IReportViewerBuilder.ScaleMode(Telerik.ReportViewer.Mvc.ScaleModes) is now obsolete. Please use Telerik.ReportViewer.Mvc.IReportViewerBuilder.ScaleMode(Telerik.ReportViewer.Mvc.ScaleMode) overload instead.")]
IReportViewerBuilder ScaleMode(ScaleModes scaleMode)
The ScaleModes enumeration value for sizing behavior.
Returns:The current IReportViewerBuilder instance for method chaining.
Determines whether the search metadata will be delivered on demand or generated by default during report rendering.
IReportViewerBuilder SearchMetadataOnDemand(bool enable)
True to generate search metadata on demand only when needed, false to generate it during initial report rendering.
Returns:The current IReportViewerBuilder instance for method chaining.
Enabling search will notify the report engine to produce search metadata while rendering the report. This metadata is used by the report viewer in search dialog and in the report viewer area for highlighting the found and selected items. Default value: false
Configures the send email functionality options for the report viewer.
IReportViewerBuilder SendEmail(SendEmail sendEmailOptions)
The SendEmail configuration object that defines email sending capabilities and settings.
Returns:The current IReportViewerBuilder instance for method chaining.
Enables users to email reports directly from the viewer interface with customizable email settings.
Sets the URL of the Telerik Reporting REST service that will provide the report viewer with reports and handle processing operations.
IReportViewerBuilder ServiceUrl(string serviceUrl)
The complete URL of the properly configured Telerik Reporting REST service endpoint.
Returns:The current IReportViewerBuilder instance for method chaining.
The service must be properly configured for successful communication between the viewer and server.
Sets the URL for the custom report viewer template that defines the viewer's UI structure and appearance.
IReportViewerBuilder TemplateUrl(string templateUrl)
The URL path to the custom HTML template file for viewer UI customization.
Returns:The current IReportViewerBuilder instance for method chaining.
Allows customization of the viewer interface by providing a custom template with modified functionality or styling.
Specifies whether the viewer is in interactive or print preview mode. PrintPreview - Displays the paginated report as if it is printed on paper. Interactivity is not enabled. Interactive - Displays the report in its original width and height with no paging. Additionally interactivity is enabled.
IReportViewerBuilder ViewMode(ViewMode viewMode)
The ViewMode enumeration value: PrintPreview for paginated print layout, or Interactive for original dimensions with enabled interactivity.
Returns:The current IReportViewerBuilder instance for method chaining.
PrintPreview displays paginated reports as they would appear when printed, while Interactive enables full report interactivity.
Specifies whether the viewer is in interactive or print preview mode. PRINT_PREVIEW - Displays the paginated report as if it is printed on paper. Interactivity is not enabled. INTERACTIVE - Displays the report in its original width and height with no paging. Additionally interactivity is enabled.
[Obsolete("Telerik.ReportViewer.Mvc.IReportViewerBuilder.ViewMode(Telerik.ReportViewer.Mvc.ViewModes) is now obsolete. Please use Telerik.ReportViewer.Mvc.IReportViewerBuilder.ViewMode(Telerik.ReportViewer.Mvc.ViewMode) overload instead.")]
IReportViewerBuilder ViewMode(ViewModes viewMode)
The ViewModes enumeration value specifying the display mode.
Returns:The current IReportViewerBuilder instance for method chaining.