I have one SSRS report URL which if I enter that URL in the browser then it shows the SSRS report with Print and Save option like:
Which works fine on the b
If you want a simple URL to download the report in PDF format, don't add parameters to the web portal URL but add them to an URL that points to the web service:
string URL = "http://xyz/reportserver/?/UAT/SampleReport_V1";
string Command = "Render";
string Format = "PDF";
URL = URL + "&SrNo=X123&rs:Command=" + Command + "&rs:Format=" + Format;
you are converting to pdf
with default converter of code. we do not follow this method to convert reports in to pdf
. If you wanna ask more option which is lengthy but not tough to do. You can use WKHTMLtopdf method to convert your html in to pdf
. it is easy to use. I am not saying that the method you are using is wrong. but we need to use latest technologies. Asp.netcore
is working fine with wkhtmltopdf
to convert html page in to pdf.
You're better off doing this using the supported ReportExecution2005.asmx endpoint with something like WCF, instead of trying to use HTTP web request to impersonate a user interaction in a browser.
Once you've got it setup, there are Render methods on the report execution instance that make it really easy to get the report as a PDF.