|
<ej-tab #tab>
<e-tabitems>
<e-tabitem [header]="headerText[0]" content="#buttonSection"></e-tabitem>
<e-tabitem [header]="headerText[1]" content="#report"></e-tabitem>
</e-tabitems>
</ej-tab>
<div id="report">
<div *ngIf="enableReport">
<h2>Essential JavaScript ReportViewer </h2>
<ej-reportviewer #reportViewer id="reportViewer_Control" [reportServiceUrl]="serviceUrl" [processingMode]="Remote" [reportPath]="reportPath" [parameters] = "parameters">
</ej-reportviewer>
</div>
</div> |
|
export class AppComponent {
@ViewChild('reportViewer') reportViewer: EJComponents <any,any>;
@ViewChild('tab') tab: TabComponent;
public enableReport: Boolean = false;
public serviceUrl: string;
public reportPath: string;
public title = 'Average Sales Comparison';
public headerText: Object[] = [];
public ngOnInit(): void {
this.headerText = [
{ 'text': 'List' },
{ 'text': 'Report' }
];
}
constructor() {
this.serviceUrl = 'http://js.syncfusion.com/ejservices/api/ReportViewer';
}
public btnClick(): void {
this.tab.select(1);
this.enableReport = true;
this.reportPath = 'GroupingAgg.rdl';
}
} |