FastReport在MVC中安装使用
来源:互联网 发布:淘宝联盟分享不了图片 编辑:程序博客网 时间:2024/05/18 00:50
1、在根文件webconfig中加入以下信息
iis6版本,在system.web中加入
<httpHandlers> <add path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport"/> </httpHandlers>
ii7版本,在system.webServer中加入
<handlers> <add name="FastReportHandler" path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport"/> </handlers>
2、在包含views的文件夹中webconfig中加入以下信息:引用命名空间
<add namespace="FastReport" /> <add namespace="FastReport.Web" />
3、在_Layout.cshtml文件中<head>加入
@WebReportGlobals.Scripts()@WebReportGlobals.Styles()4、在方法中写入调用方法
var id=Request.Params["id"]; WebReport webReport = new WebReport(); // 创建报表对象 webReport.Width = 600;//设置报表宽度 webReport.Height = 800;//设置报表高度 webReport.Report.SetParameterValue("param", id);//传递报表参数 webReport.Report.RegisterData(dataSet, "AppData"); //传递数据 webReport.ReportFile = this.Server.MapPath("~/App_Data/report.frx");//调用报表 ViewBag.WebReport = webReport;//赋值报表给页面 return View();//返回页面
5、在view视图中加入
@ViewBag.WebReport.GetHtml()
找不到命名:原因fastreport老版本不支持,需要新版本
1 0
- FastReport在MVC中安装使用
- 在FastReport中使用自定义变量
- 在fastReport中使用自定义变量
- C#学习博客-FastReport在.Net中使用
- 使用FastReport.net在用户的应用程序中创建报表
- 使用报表工具FastReport.NET在XAML中创建表格
- FastReport.net 在vs2008下的安装
- 在FastReport中动态创建memo
- 在fastreport中加入自定义函数。
- 在FastReport中设置上下标
- 在BS表单上使用fastreport.net
- delphi2010中FastReport的安装方法
- FastReport的使用(安装问题)
- FastReport.Net 在asp.net MVC中的运用
- 在Delphi的DLL中使用FastReport要处理的几个问题
- 在Delphi的DLL中使用FastReport要处理的几个问题
- 在MVC中使用Uploadify
- delphi中fastreport的基本使用
- 使用JDBC调用mysql存储过程
- Java数据结构之简单的链表的实现
- 指令集及流水线基本概念
- 【LeetCode】122. Best Time to Buy and Sell Stock II
- 输出坐标值
- FastReport在MVC中安装使用
- Android Canvas绘图详解(图文)
- Struts2的文件上传与下载
- AlertDialog入门
- Thinkphp 关联关系一对多,取出数组
- Permutation(递归)
- HDOJ 2005 第几天?
- 乐学成语中出现的问题
- jQuery中的动画