public ActionResult PrintReprtForSpecicDates(DateTime startdate, DateTime enddate)
{
string path = Server.MapPath("~/Reports/myreport.html");
ViewBag.SpecificReport = path;
using (ProDbDataContext _Context = new ProDbDataContext())
{
List<Sp_GetSpecificRecordResult> RecordList = _Context.Sp_GetSpecificRecord(startdate,enddate).ToList();
foreach (var item in RecordList)
{
item.ImagePath = "/ProductsImages/" + item.ImagePath;
}
var dt = Helper.Helper.ToDataTable(RecordList);
RptGetSpecificRecords reportobj = new RptGetSpecificRecords();
reportobj.DataSource = dt;
reportobj.Parameters["Startdate"].Value = Convert.ToDateTime(startdate).ToShortDateString();
reportobj.Parameters["Enddate"].Value = Convert.ToDateTime(enddate).ToShortDateString();
reportobj.ExportToPdf(path);
}
return View();
}
Как мне быть дальше? у меня есть экспорт в html, но теперь я хочу экспортировать в pdf, подскажите, что делать дальше?