In This Topic
Note: The HTML5 Viewer is marked as
obsolete and has been replaced by the
Web Report Viewer.
The HTML5 Viewer is available in ASP.NET WebForms and ASP.NET MVC applications and supports all popular browsers. Therefore it is applicable on clients with different operating systems. It allows interactive input through Drilldown and report parameters.
Basic Concepts
- In ASP.NET WebForms you place the Html5ViewerControl on the website. In ASP.NET MVC you can use the HtmlHelp extension method.
- On the server side you set the DataSource, the project file, the temp path and some optional properties in an event that is called by the HTML5 Viewer.
Integration
To integrate the HTML5 Viewer into your application proceed as follows. Further details can be found in the provided application samples for ASP.NET.
Step 1: Add HTML5 Viewer to your application
ASP.NET Web Forms:
In an ASP.NET WebForms application just add the Html5ViewerControl from the combit.Reporting.Web namespace of the combit.ListLabel28.Web.dll. Please also see the example 'Web Reporting Sample' in the List & Label installation:
<%@ Register TagPrefix="combit" Namespace="combit.Reporting.Web" Assembly="combit.Reporting.Web" %>
<html>
<head>
<title><asp:Literal ID="LTViewerTitle" runat="server"></asp:Literal></title>
</head>
<body>
<form method="post" runat="server">
<div>
<combit:Html5ViewerControl ID="Html5ViewerControl1" runat="server"></combit:Html5ViewerControl>
</div>
</form>
</body>
</html>
ASP.NET MVC:
Please also see the example in the List & Label installation directory under 'MVC Web Reporting Sample'.
Step 2: Setup project file and other data on the server side
The necessary routes will need to be registered in the Application_Start() function of your application (Global.asax file), even if your application is not based on ASP.NET MVC. Add the following lines:
Important: If you are also using MVC/Web API, the Html5ViewerConfig.RegisterRoutes function must be registered before your own routes.
In the event handler the data required for the HTML5 Viewer will be passed:
The name of the selected report can be set in ASP.NET WebForms by using the ReportName property of the Html5ViewerControl object. In ASP.NET MVC it can directly passed as a parameter of the HtmlHelper extension method @Html.Html5Viewer().
In the OnListLabelRequest event it is then available again under e.ReportName, so that the corresponding data source and project file can be loaded.
Options
The Html5ViewerOptions class that you assign to the Options property of the Html5ViewerControl or pass as a parameter of the HtmlHelper extension method @Html.Html5Viewer() enables you to define where required jQuery and jQuery Mobile files should be loaded from (CDNType), which CSS files should be loaded (ThemeCSSUrl, ThemeIconsCSSUrl) or which jQuery Mobile theme should be used (DataTheme). For more information about these formatting options please see the jQuery Mobile help available online.