asp.net使用rdlc显示Oracle数据库数据
来源:互联网 发布:网络拍卖经营许可证 编辑:程序博客网 时间:2024/06/05 15:21
1、首先是传参数,数组型的参数名、参数值、参数类型,如下:
string[] paraNames2 = { "p_cursor", "cs_ny1", "cs_ny2", "cs_cc", "lclx" };//"cs_ny" string[] paraValues2 = { "p_cursor",ymstart, ymend, cc, lclx }; string[] oraParamType = { "refCursor", "String", "String", "String", "String" };
2、调用存储过程来取要使用的数据值:
Tools tool = new Tools(); DataTable dt = new DataTable(); DBOra db = new DBOra("3"); dt = db.GetTableFromProc("pk_cwmx.p_cwmx", tool.strToPraram(paraNames2, paraValues2, oraParamType));
其中tool.strToPraram函数用来转换c#类型为oracle类型3、添加报表和数据集:
this.ReportViewer1.LocalReport.ReportPath = "table.rdlc"; this.ReportViewer1.LocalReport.DataSources.Clear(); this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_DataTable1", dt));rdlc路径不正确会有“尚未指定报表“smz.table.rdlc”的报表定义”的错误;数据集名字不正确,会有“尚未为数据源“ ”提供数据源实例”的错误;
4、最后,刷新报表:
this.ReportViewer1.LocalReport.Refresh();
- asp.net使用rdlc显示Oracle数据库数据
- Asp.net 中使用Reporting Service(.rdlc)
- asp.net RDLC报表使用(一)
- asp.net RDLC报表使用(二)
- ASP.Net TreeView动态显示数据库数据
- asp.net分页显示数据库中的数据
- ASP.NET 开发RDLC
- ASP.NET中使用DataGrid显示数据
- asp.net使用listview分页显示数据
- asp.net使用listview分页显示数据
- asp.net中轻量级报表RDLC的动态数据绑定
- asp.net 连接oracle 数据库-OracleClient使用
- vs2013下, asp.net mvc5 使用和发布rdlc报表的步骤 ,使用ef来获取数据
- Asp.Net使用DataSet查询数据库数据
- Asp.Net使用DataTable查询数据库数据
- 在Asp.net MVC中使用Rdlc输出文件
- 如何在ASP.NET中显示数据库中的数据
- asp.net连接access数据库并显示数据
- C Programming Language 1-13
- 短语:the writing is on the wall
- gbk, gb2312,big5,unicode,utf-8,utf-16的区别
- 为什么PPC是移动广告的最佳模式?
- 匿名内部类
- asp.net使用rdlc显示Oracle数据库数据
- 统计字符串中子串出现的次数与位置
- tslib1.4移植
- java 从jar包中读取资源文件
- TemplateMethod模式
- TD注意
- 手动从Mysql 5.1.X 升级到 5.5.X 要注意的其它内容
- 什么是FastCGI?
- Qt学习之路(3):Hello, world!(续)