I'm using C#, MVC .NERT Framework.
The PrintReport function, below, works very well.
The problem is that the report is downloaded and saved to the user directly without any dialog!
I want to allow him to decide where to save the report.
In fact, passing "true" here
Code: Select all
StiReportResponse.ResponseAsJpeg(report, exportSettings, true);
Any idea on how to display save dialog, please?
Here is my code:
Code: Select all
public ActionResult PrintReport(int? cid)
{
string sReportAssembly = "TraineesCertificate.dll";
string sPath = Server.MapPath(@"~\Reports") + @"\";
string sImgPath = Server.MapPath(@"~\Reports") + @"\";
string sFullFileName = "";
sFullFileName = sPath + @"\" + sReportAssembly;
StiReport report = StiReport.GetReportFromAssembly(sFullFileName);
StiImageExportSettings exportSettings = new StiImageExportSettings();
report["CID"] = cid;
exportSettings.ImageFormat = StiImageFormat.Color;
exportSettings.ImageType = StiImageType.Jpeg;
StiReportResponse.ResponseAsJpeg(report, exportSettings, true);
return View();
}