Downloading PDF File without using viewer
Posted: Sun Aug 16, 2015 4:10 am
Hi,
I want to let the user download the PDF file directly and without using viewer, please let me know how can I do this in ASP.NET MVC 5. Also how can I set the datasource and variables before exporting the document?
The report is in `mrt` format and my code looks like this:
Thanks in advance,
I want to let the user download the PDF file directly and without using viewer, please let me know how can I do this in ASP.NET MVC 5. Also how can I set the datasource and variables before exporting the document?
The report is in `mrt` format and my code looks like this:
Code: Select all
StiReport report = new StiReport();
report.Load(path);
//report.Render();
report.Compile();
report.RegData("DataSource1", data);
report.RegData("DataSource2", data2);
foreach (KeyValuePair<string, string> param in repParams)
{
report[param.Key] = param.Value;
}