Using the following code for updating the ReportSource of the viewer:
ngOnInit() {
this.setParameters();
}
setParameters(): void {
this.reportViewer.setReportSource({
report: 'SampleReport.trdp',
parameters: {}
});
}
comes up with the error
Argument of type '{ report: string; }' is not assignable to parameter of type 'JSON'.
Type '{ report: string; }' is missing the following properties from type 'JSON': parse, stringify, [Symbol.toStringTag]
Currently, the workaround is to cast the reportSource object as follows:
ngAfterViewInit() {