Migrate to Report Viewer v2.0 component
This section provides simple step-by-step instructions to update your existing Report Viewer application to our latest modern v2.0 scripts, styles and components.
Replacing CSS reference
- Open the
angular.jsonfile. - Remove the Report Viewer component old style
bold.reports.all.min.css
- Added v2.0 style
\v2.0\tailwind-light\bold.report-viewer.min.css
- The final updated
angular.jsonfile.
If you are using an Angular 6 or lower version project, add the changes to the
angular-cli.jsonfile.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "reportviewerapp"
},
"reportviewerapp": [
{
"root": "src",
"outDir": "dist",
. . .
. . .
"styles": [
"styles.css",
"./node_modules/@boldreports/javascript-reporting-controls/Content/v2.0/tailwind-light/bold.report-viewer.min.css"
],
"scripts": [],
. . .
. . .
}Replacing Report Viewer component
-
Open the
app.module.tsfile. -
Remove the Report Viewer component old scripts
bold.report-viewer.minej.bulletgraph.minej.chart.min
-
Added v2.0 scripts
\v2.0\common\bold.reports.common.min\v2.0\common\bold.reports.widgets.min\v2.0\bold.report-viewer.min.css
-
The final updated
app.module.tsfile.import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { BoldReportViewerModule } from '@boldreports/angular-reporting-components'; import { AppComponent } from './app.component'; import '@boldreports/javascript-reporting-controls/Scripts/v2.0/common/bold.reports.common.min'; import '@boldreports/javascript-reporting-controls/Scripts/v2.0/common/bold.reports.widgets.min'; import '@boldreports/javascript-reporting-controls/Scripts/v2.0/bold.report-viewer.min'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, BoldReportViewerModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }