时间: 2016/10/30 13:04:06
iis6:"FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport" />
iis7:"FastReportHandler" path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport"/>
@WebReportGlobals.Scripts()
@WebReportGlobals.Styles()
@ViewBag.WebReport.GetHtml()
private WebReport webReport = new WebReport();
public ActionResult Index()
{
SetReport();
webReport.Width = 600;
webReport.Height = 800;
webReport.ToolbarIconsStyle = ToolbarIconsStyle.Black;
ViewBag.WebReport = webReport;
return View();
}
private void SetReport()
{
string report_path = AppDomain.CurrentDomain.BaseDirectory;
//传递数据
webReport.Report.RegisterData(new List<object> { new { Type = "Type", Mobile = "mobile", Price = "price", Date = "date", Title = "title", Ad = "ad" } }, "Orders");
//调用模板
webReport.Report.Load(report_path + "order.frx");
}