headers.append("Authorization", "Basic " + btoa("username:password"));
This is the url which returns a report if we paste the url in the browser.
http://SERVERADDRESS/jasperserver-pro/rest_v2/reports/REPORT.PDF?PARAM1=VALUE&PARAM2=VALUE
To program this, i plan to use angular as front end to open a pop up and allow the user to input the 2 values. then the entered values can be replaced in the URL.
Now we need to call the URL with angular code as you have suggested below. The question is since it is immediate response after the url is hit, can we not use observable and if there is a straight forward way(which is similar to http client in .net) Or this is the only way possible in Angular?
Thank you for your help and time
Hi Knight,
So the report is a PDF file generated by your server?
What is it you are trying to do with it? Let the client download, or show on screen?
if its a PDF, you need to convert it back to file object using a BLOB, and then put it in a iframe, or make it available for download by putting it into a <a [src]="generatedFIle">download</a>
Regards
Sander