Migrate to Report Designer v2.0 component
This section provides simple step-by-step instructions to update your existing Report Designer component to our latest v2.0 component.
This section explains migration steps to migrate Bold Report Designer version lesser than
v5.2.xxtov5.2.xxand above.
Replacing CSS reference
-
Open the
angular.jsonfile. -
Remove the Report Designer component older CSS references.
bold.reports.all.min.cssbold.reportdesigner.min.css
-
Add v2.0 CSS reference into the file.
\v2.0\tailwind-light\bold.report-designer.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", "version": 1, "newProjectRoot": "projects", "projects": { "reportdesignerapp": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "app", "schematics": {}, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/reportdesignerapp", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ "src/styles.css", "./node_modules/@boldreports/javascript-reporting-controls/Content/v2.0/tailwind-light/bold.report-designer.min.css", "./node_modules/codemirror/lib/codemirror.css", "./node_modules/codemirror/addon/hint/show-hint.css" ], "scripts": [ "./node_modules/codemirror/lib/codemirror.js", "./node_modules/codemirror/addon/hint/show-hint.js", "./node_modules/codemirror/addon/hint/sql-hint.js", "./node_modules/codemirror/mode/vb/vb.js" ], "es5BrowserSupport": true }, . . . . . . }
Replacing script references
-
Open the
index.htmlfile and remove the following script references.ej2-base.minej2-data.minej2-pdf-export.minej2-svg-base.minej2-circulargauge.minej2-maps.min
-
Open the
app.module.tsfile. -
Remove the Report Designer component older script references.
bold.report-viewer.minbold.report-designer.minej.bulletgraph.minej.chart.min
-
Add the following v2.0 script references to the page.
\v2.0\common\bold.reports.common.min\v2.0\common\bold.reports.widgets.min\v2.0\bold.report-viewer.min\v2.0\bold.report-designer.min
The final updated app.module.ts file appears like this.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { BoldReportViewerModule } from '@boldreports/angular-reporting-components';
import { AppComponent } from './app.component';
//Report Designer component dependent scripts
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';
//Report Viewer and Designer component scripts
import '@boldreports/javascript-reporting-controls/Scripts/v2.0/bold.report-viewer.min';
import '@boldreports/javascript-reporting-controls/Scripts/v2.0/bold.report-designer.min';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BoldReportViewerModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }