import { Routes } from '@angular/router';
import { GridComponent } from './grid/grid.component';
import { ReportViewerComponent } from './reportviewer/reportviewer.component';
import { HomeComponent } from './home/home.component';
import { EJAngular2Module } from 'ej-angular2';
import 'node_modules/syncfusion-ej-global/i18n/ej.culture.de-DE.min.js';
import 'node_modules/syncfusion-ej-global/l10n/ej.localetexts.de-DE.min.js';
export const rootRouterConfig: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'grid', component: GridComponent },
{ path: 'reportviewer', component: ReportViewerComponent }
]; |
import { Component } from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: 'src/reportviewer/reportviewer.component.html',
styleUrls: ['src/reportviewer/reportviewer.component.css']
})
export class ReportViewerComponent {
public serviceUrl: string;
public reportPath: string;
public serverUrl: string;
public locale: string;
public parameters: any;
constructor() {
this.serviceUrl = 'http://localhost:3994/api/ReportApi';
this.reportPath = '~/App_Data/Case Summary.rdl';
this.locale ='de-DE';
}
} |
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<ej-reportviewer id="reportViewer_Control"
[reportServiceUrl] = "serviceUrl"
[processingMode] = "Remote"
[reportServerUrl] = "serverUrl"
[reportPath] = "reportPath"
[dataSources]="reportData"
[parameters] = "parameters"
(reportError)="reportError($event)"
[locale]="locale">
</ej-reportviewer>
</body>
</html> |