The WebViewer control allows you to quickly display reports in Web applications, and now includes a FlashViewer option. You must purchase the Professional Edition license in order to use the WebViewer control; the FlashViewer can be used in both Standard and Pro Editions. If you have the Standard Edition license, see Web Walkthroughs (Standard Edition).
To use the WebViewer control, you must first add it to the Visual Studio toolbox. See Adding ActiveReports Controls for more information.
You must also configure HTTP Handlers on your server so that IIS knows how to associate ActiveReports files in the browser.
Once you have the control in your toolbar, you can add it to the Design view of an ASPX page in a Web application, and set its ReportName property to the name of an ActiveReport within your solution.
Important: If you elect to use the FlashViewer ViewerType, you must copy the ActiveRepors.FlashViewer.swf file into your project folder. This file is located in:
C:\Program Files\GrapeCity\ActiveReports 6\Deployment (on a 64-bit Windows operating system, this file is located in C:\Program Files (x86)\GrapeCity\ActiveReports 6\Deployment).
For more control of the output, the WebViewer offers many properties, some of which only apply when you select a specific ViewerType. Drop down the table below for more information on each of the properties.
WebViewer Control Properties
These options apply only when you select the FlashViewer ViewerType.
- Display Transparency Allows you to specify whether to print transparent objects.
- HyperLinkBackColor Allows you to specify the background color of the controls that host a hyperlink.
- HyperLinkForeColor Allows you to specify the color of the text within a control that hosts a hyperlink.
- HyperLinkUnderline Determines whether the text in the control that hosts a hyperlink is underlined.
- MultiPageViewColumns Determines the amount of columns to show when ViewType is MultiPage.
- MultiPageViewRows Determines the amount of rows to show when the ViewType is MultiPage.
- PageNumber Allows you to specify the page to display initially.
- PrintOptions Allows you to specify how the viewer handles page orientation and scaling. The StartPrint option allows you to specify whether to print the report after loading for one-touch printing. If you set the WebViewer's Height and Width properties to 0, you can have the report print without displaying it.
- ResourceLocale Allows you to specify the culture for localization. Separate multiple values with commas.
- ResourceUrl Allows you to specify the comma-separated list of URLs to SWF files with resource files.
- SearchResultsBackColor Allows you to specify the background color of the highlighted text in the Find dialog of the WebViewer control.
- SearchResultsForeColor Allows you to specify the color of the highlighted text in the Find dialog of the WebViewer control.
- ShowSplitter Allows you to specify whether to display the splitter, which allows the user to compare report pages in the viewer.
- ThemeUrl Allows you to specify the relative URL of a skin to use on the FlashViewer. The following skins are included:
- TocPanelOptions Allow you to specify the display options of the table of contents pane.
- Url Allows you to specify the relative URL of the FlashViewer control.
- UseClientApi Allows you to specify whether to use the client API for the FlashViewer.
- ViewType Allows you to specify the page view type. Select from Single, MultiPage, or Continuous.
- WindowMode Allows you to specify such display options as transparency, layering, and positioning of the FlashViewer in the browser. Select from Window, Opaque and Transparent.
- Zoom Allows you to specify the zoom level, between 10% and 800%, at which to display the report.
These options apply only when you select the HtmlViewer ViewerType.
- BookmarkStyle Allows you to specify whether to use HTML bookmarks.
- CharacterSet Allows you to select from 15 character sets to use for the report.
- CreateFramesetPage Allows you to specify whether to use Frameset or Body tags in the generated HTML report.
- IncludeHtmlHeader Allows you to specify whether to include a header section in the generated HTML report.
- IncludePageMargins Allows you to specify whether to keep page margins with reports in the generated HTML.
- OutputType Allows you to specify whether to use DHTML or HTML for the output.
- RemoveVerticalSpace Allows you to specify whether to keep white space, for example, space at the end of a page not filled with data before a page break.
- Title Allows you to specify the text to display in the title bar of the Web browser.
||The maximum number of seconds that a request for a report's output waits for the report to finish executing. The default value is 10 seconds. If a report takes longer to run than the value of this property, the control makes subsequent requests at 5 second intervals for the report to see when it is finished executing.|
These options apply only when you select the AcrobatReader ViewerType.
- Application Allows you to set the value to display in the Application field in the Document Properties dialog of the Acrobat Reader.
- Author Allows you to set the value to display in the Author field in the Document Properties dialog of the Acrobat Reader.
- CenterWindow Allows you to specify whether to position the document's window in the center of the screen in the initial view when the document is opened in the Acrobat Reader.
- ConvertMetaToPng Allows you to specify whether to convert meta files (WMF or EMF) into PNG files in the PDF.
- DisplayMode Allows you to specify how to display the document: in outlines, thumbnails, full screen, or none to use the Acrobat Reader's default display mode.
- DisplayTitle Allows you to specify whether to display the document title from the Title property.
- Encrypt Allows you to specify whether to encrypt the document.
- ExportBookmarks Allows you to specify whether to create PDF bookmarks from any bookmarks that may be in the report.
- FitWindow Allows you to specify whether to resize the document's window to fit the size of the first displayed page.
- HideMenuBar Allows you to specify whether to hide the viewer application's menu bar when the document is active.
- HideToolbar Allows you to specify whether to hide the viewer application's tool bars when the document is active.
- HideWindowUI Allows you to specify whether to hide user interface elements in the document’s window (such as scroll bars and navigation controls), leaving only the document’s contents displayed.
- ImageQuality Allows you to specify whether to render image metafiles (WMF or EMF) in the document at lowest, medium, or highest quality.
- ImageResolution Allows you to specify the image resolution for metafiles (WMF or EMF).
Typical values are 75-2400 dpi. 75 dpi at low resolution would be used to save space, 150 dpi is used for normal screen viewing and 300 dpi and higher is used for print quality.
Keywords Allows you to set the value to display in the Keywords field in the Document Properties dialog of the Acrobat Reader. These are used in document searches.
- NeverEmbedFonts Allows you to specify a semicolon-delimited string of values indicating which fonts are not embedded in the PDF document. Not embedding any of the fonts used in your documents can reduce the PDF file size dramatically if you use many fonts.
- OwnerPassword Allows you to specify the password to enter in the reader to permit full access to the document regardless of the specified user permissions.
- Permissions Allows you to specify the user permissions for the document. You can combine Permissions by using commas between values.
- Subject Allows you to specify the value to display in the Subject field in the Document Properties dialog of the Acrobat Reader.
- Title Allows you to specify a title to display when the DisplayTitle property is set to True.
- Use128Bit Allows you to specify whether to use 128 bit encryption with full permissions capability. Set to True to enable the AllowFillIn, AllowAccessibleReaders, and AllowAssembly permissions to function. Set to False to use 40 bit encryption with limited permissions.
- UserPassword Allows you to specify the password to enter to allow a user to open the document in the reader. If this value is left empty, the user is not prompted for a password, but is restricted by the specified permissions.
- Version Allows you to specify whether to use Pdf11 (v1.1), Pdf12 (v1.2), or Pdf13 (v1.3 or Acrobat 4.0).
|This new property replaces the old Report property. The new property is a string instead of an ActiveReport object, and specifies the report to display in the viewer.|
||Inherited from System.Web.UI.WebControls.WebControl|
||The interval in seconds between the time the report was last retrieved and the time the report is removed from the ASP.NET WebCache.|
RawHtml Shows all pages in the report document as one continuous HTML page. Provides a static view of the entire report document, and generally printable output, although under some circumstances pagination is not preserved.
AcrobatReader Returns output as a PDF document viewable in Acrobat Reader.
Client requirements: Adobe Acrobat Reader.
FlashViewer Provides an interactive viewing experience and no-touch printing using the widely-adopted Flash Player.
Client Requirements: Adobe Flash Player.
For more information on properties inherited from the system, see the Class Library and Visual Studio help.