Hello,
I want to implement report viewer in my application with angular 2 also using report server (something like in Thread: 131579 https://www.syncfusion.com/forums/131579/report-viewer-angular-2-report-server)
I am trying use example in that thread, but Iam getting an error: Connection refused ().
In that thread there is an example with SystemJS and in documentation (https://help.syncfusion.com/angular/reportviewer/getting-started#load-ssrs-server-reports) there is also example with SystemJS, but I am using WebPack. Maybe you have some working examples using WebPack instead of SystemJS?
|
import { Component, Input, Output,EventEmitter } 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 parameters: any;
public reportData: any;
public toolbarSettings: any;
constructor() {
var data = sessionStorage.getItem('ReportName');
this.serviceUrl = 'http://js.syncfusion.com/ejservices/api/ReportViewer';
this.reportPath = data + '.rdl';
}
reportError(event){
alert("Triggers after the suggestion list is opened.");
}
} |
|
public void Configuration(IAppBuilder app)
{
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
var config = new HttpConfiguration();
// Registering config within WebApiConfig
//WebApiConfig.Register(config);
// Using config
app.UseWebApi(config);
} |
|
Print function is still showing and printing empty page, but only while using Chrome browser. On other platforms everything is working with this function.
|
We were unable to reproduce the mentioned problem at our end. We have checked the previously shared Agular application in chrome and Mozilla Firefox browser in which the export and print option are working properly at our end. So can you please share the browser version details to validate the mentioned problem at our end.
|
|
Also using Mozilla Firefox clicking Export button reloads browser window. Same problem with reload is with Export from ReportViewer and also from grid. |
We have analyzed your query and we are unable to reproduce the reported issue “while exporting browser window get reloaded” from our end. We have prepared a sample and it can be downloadable from the below location.
Please provide the following details for better assistance.
|
|
In Chrome browser when I click print button, first of all print pop-up is blocked by default (I do not know if it should be like that). |
We can load the print preview window in next tab of browser instead of loading the print preview popup. Please find the below code snippet to load the print preview window in next tab.
Typescript:
Html:
| ||
|
Also, right before print window shows, all content (theme or sth like that) is refreshing (I do not think that it should work like that). |
We have checked the mentioned problem in our online sample browser and its working properly at our end. In which the print preview does not get refreshed in chrome preview window. So can you please share the chrome browser version to validate the mentioned problem at our end. | ||
|
In Mozilla Firefox browser also print pop-up is blocked by default, but the content is not refreshing so it is good. But in Mozilla Firefox there are no image while trying to print. |
We have already fixed the mentioned problem in our latest Essential studio build release. We have not merged the changes in our online samples and the changes will be reflected in our upcoming volume 1 2018 release. |
|
about Chrome content refreshing - now I have latest Chrome version (64.0.3282.119 (64 bit)) and it is still the same problem. another problem with export in Mozilla - on export the window is refreshing. I am using the same route path for all our application (I have one main window and in that window there are components in other components, but the route path is the same for everything) and after export the window refresh and because of that I am getting the starting page of application. Maybe you know how to fix that problem? With Chrome there are no such problem, the view after export is the same like before export. (Mozilla version is 58.0 (64-bit)). The same problem is also with grid export not only with export from ReportViewer.
|
We have checked the mentioned problem in Angular ReportViewer, Grid sample and its working properly at our end. So we need some additional information to find the cause of the issue. Please share us the following details.
Please ensure to follow the steps provided in the documentation Link:-
1. Grid and ReportViewer code example (both in server and client side).
2. Screenshot/Video Demo to replicate the issue.
3. If possible provide an issue reproducing sample or hosted link.
The provided information will be helpful to provide you response as early as possible.
|
|
And also before I forgot to mention one more problem with printing in chrome. If I want to use system dialog for printing print window just closes (it shows system dialog for printing for about a second and after that the window just closes). It is working like that also with your sample application. |
We have checked the mentioned problem by using “Print Using System Dialog” option in chrome browser and the print is not closed at our end. We have prepared a demo video and it can be downloaded from below location,
If the issue still persists, then share the issue video or sample application to validate the mentioned problem at our end. |