Migrate to Report Viewer v2.0 component
To migrate your Angular application to the Bold Reports® Report Viewer v2.0 component, replace the old style and script references with the v2.0 styles and scripts in the angular.json and app.module.ts files.
How do I replace the CSS reference for v2.0?
To replace the CSS reference for the Bold Reports® Angular Report Viewer v2.0, remove the old style from the angular.json file and add the v2.0 style.
- Open the
angular.jsonfile. - Remove the old Report Viewer component style.
bold.reports.all.min.css
- Add the v2.0 style.
\v2.0\tailwind-light\bold.report-viewer.min.css
- The final updated
angular.jsonfile looks as follows:
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": [],
. . .
. . .
}How do I replace the Report Viewer scripts for v2.0?
To replace the scripts for the Bold Reports® Angular Report Viewer v2.0, remove the old script imports from the app.module.ts file and import the v2.0 scripts.
-
Open the
app.module.tsfile. -
Remove the old Report Viewer component scripts.
bold.report-viewer.minej.bulletgraph.minej.chart.min
-
Add the 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 looks as follows: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 { }