New to Telerik Reporting? Download free 30-day trial

How to use HTML5 Report Viewer in Vue.js


Product Progress® Telerik® Reporting R2 2020
Framework Vue.js
Report Viewer HTML5


The HTML5 Report Viewer is built upon HTML5, CSS, and JavaScript. This allows the viewer to be used in virtually any JavaScript framework. Vue.js has been gaining a lot of traction and we would like to explore how the HTML5 Report Viewer could be implemented, together with its dependencies, in a Vue application. The solution we are about to examine is a very basic approach to create a new Vue.js application, include the viewer's dependencies, and display the report viewer.


The following guide assumes previous knowledge of Vue.js:

  1. Start by creating a new Vue application using the following CLI command:

    vue init webpack hello-world
  2. The viewer depends on jQuery. In the application folder run:

    npm install jquery --save
  3. Open build/webpack.base.conf.js and add plugins:

    const webpack = require('webpack')
    module.exports = {
      plugins: [
        new webpack.ProvidePlugin({
          $: 'jquery',
          jquery: 'jquery',
          'window.jQuery': 'jquery',
          jQuery: 'jquery'
  4. If you are using ESLint, open .eslintrc.js and add globals:

    module.exports = {
      globals: {
        "$": true,
        "jQuery": true
  5. Add the desired Kendo UI Less-Based Theme to index.html in order to style the viewer:

      <link href="" rel="stylesheet" />
      <link href="" rel="stylesheet" />
  6. Add Kendo UI for jQuery JS library. An alternative approach is to add only the subset of Kendo widgets required for the proper work of the HTML5 Report Viewer. The subset is available in the Telerik Reporting installation folder (C:\Program Files (x86)\Progress\Telerik Reporting R2 2020\Html5\ReportViewer\js\telerikReportViewer.kendo- and can be copied to the Vue application's assets folder (src/assets/ReportViewer/js). Then reference it in App.vue:

    import './assets/ReportViewer/js/telerikReportViewer.kendo-'

    To avoid getting errors from ESLint for any report viewer dependencies, add them to .eslintignore:

  7. Add the HTML5 Report Viewer JS library from the Telerik Reporting installation folder (C:\Program Files (x86)\Progress\Telerik Reporting R2 2020\Html5\ReportViewer\js) to assets (src/assets/ReportViewer/js).

  8. Create a new report viewer component and configure the routes accordingly. The new component contains a div element to hold the report viewer object and applies CSS to this element. The component calls the telerik_ReportViewer method to create the report viewer with the specified configuration options. It is important that the serviceUrl option points to the URL of a working Reporting REST Service. How to implement this service is described here.

      <div class="hello">
        <div id="reportViewer1">loading...</div>
    import '../assets/ReportViewer/js/telerikReportViewer-'
    export default {
      name: 'ReportViewer',
      data () {
        return {
          msg: 'Welcome to Your Vue.js App'
      mounted () {
        this.$nextTick(function () {
              serviceUrl: 'http://my.service.url/api/reports/',
              reportSource: {
                report: 'Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary'
              viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
              scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
              scale: 1.0,
              sendEmail: { enabled: true }
    <!-- Add "scoped" attribute to limit CSS to this component only -->
    <style scoped>
      body {
          font-family: Verdana, Arial;
          margin: 5px;
      #reportViewer1 {
          position: absolute;
          top: 70px;
          bottom: 10px;
          left: 10px;
          right: 10px;
          overflow: hidden;
          clear: both;
  9. Run

    npm run dev

    HTML5 Report Viewer in Vue.js

See Also

Download the final Vue.js application.

In this article