[]
This page provides a detailed overview of the ActiveReportsJS JavaScript Report Viewer Component. You can check the Get Started tutorial for a concise guide for integrating this component into a JavaScript application.
A JavaScript application that uses the ActiveReportsJS Report Viewer Component should include the following scripts and styles:
The easiest way to include these scripts is to use CDN references, for example:
<link
rel="stylesheet"
href="https://cdn.grapecity.com/activereportsjs/2.latest/styles/ar-js-ui.css"
type="text/css"
/>
<link
rel="stylesheet"
href="https://cdn.grapecity.com/activereportsjs/2.latest/styles/ar-js-viewer.css"
type="text/css"
/>
<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-core.js"></script>
<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-viewer.js"></script>
<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-pdf.js"></script>
<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-xlsx.js"></script>
<script src="https://cdn.grapecity.com/activereportsjs/2.latest/dist/ar-js-html.js"></script>
Alternatively, you can download these scripts and styles from the ActiveReportsJS Download Page. You can find them in the dist
and styles
folders of the download package, respectively.
Finally, @grapecity/activereports package can be installed in an application's folder and these scripts can be referenced from node_modules\@grapecity\activereports\dist\
and node_modules\@grapecity\activereports\styles\
folders
Once scripts and styles are loaded, the instance of JavaScript Report Viewer Component can be initialized by invoking ActiveReports.Viewer
constructor and passing the CSS selector of the hosting element into it, for example:
<body>
<div id="viewer-host"></div>
<script>
var viewer = new ActiveReports.Viewer("#viewer-host");
</script>
</body>
The instance of ActiveReports.Viewer
exposes methods and properties that you can use to customize viewer appearance, preview reports, print or export them.