My question is related to this link : Crystal Reports in ASP.NET MVC As per one of teh answer by coderguy123 I have written Action method at controller side ? But what will be the javascript side code ( i will be using js file to invoke this Action method )
Also , return type of action method in following method is
public ActionResult Report()
{
ReportClass rptH = new ReportClass();
rptH.FileName = Server.MapPath("[reportName].rpt");
rptH.Load();
rptH.SetDataSource([datatable]);
Stream stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
return File(stream, "application/pdf");
}
File .. but when i call it from js file , it is giving error .. Not sure if return type matched with datatype file ...
Basically , I want client side code to invoke this method and display the pdf file in new browser ?