Crystal Report & Procedure
步骤:
1.编写procedure (yearConsume)
2.新建dataset,这里使用步骤一创建的存储过程yearConsume
3.新建rpt,数据库字段从ADO.NET数据集中选取存储过程
4.新建aspx页面,并导入CrystalReport Viewer
5.在aspx.cs页面加入代码,代码如下
string strProvider = "Server=(local);DataBase=数据库名称;UID=用户名;PWD=密码";
SqlConnection myConn = new SqlConnection(strProvider);
myConn.Open();
SqlDataAdapter myAdapter = new SqlDataAdapter("yearConsume",myConn);
//设置命令对象类型为存储过程
myAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
myAdapter.SelectCommand.Parameters.Add("@rtYear",SqlDbType.Int,4);
myAdapter.SelectCommand.Parameters["@rtYear"].Value = "2006";
DataSet ds = new DataSet();
myAdapter.Fill(ds,"tblConsumeHead");
ReportDocument consumeReport = new ReportDocument();
consumeReport.Load(Server.MapPath("YearConsume.rpt"));
consumeReport.SetDataSource(ds);
this.CrystalReportViewer1.ReportSource = consumeReport;
我在运行aspx页面的时候,出现访问报表需要登陆的页面
您请求的报表需要更多信息.
服务器名:
数据库名:
用户名:
密码:
问题出在哪里呢,请大家帮忙解决。
相关推荐
Design procedure for photonic crystal fibers with ultra-flattened chromatic dispersion
A simple design procedure is used to generate photonic crystal fibers (PCFs) with ultra-flattened chromatic dispersion. Only four parameters are required, which not only considerably saves the computing time, but also distinctly reduces the air-hole quantity. The influence of the air-hole diameters of each ring of hexagonal PCFs (H-PCF, including 1-hole-missing and 7-hole-missing H-PCFs), circular PCFs (C-PCF), square PCFs (S-PCF), and octagonal PCFs (O-PCF) is investigated through simulations.
Crystal_Reports简单开发手册
Crystal_Reports简单开发手册
加农炮:Crystal的闪电般的快速数据序列化和RPC
加农炮:Crystal的闪电般的快速数据序列化和RPC
Numerical analysis of multicore photonic crystal fibers
A Galerkin’s method-based numerical procedure is extended to obtain the modal field distribution of multicore photonic crystal fibers for the first time to our knowledge, which can reveal how the air hole size influences the mode coupling and how the coupling strength varies with wavelength. These results will be helpful in the future design of multicore photonic crystal fibers with proper guidance properties.
json_rpc:JSON-RPC客户端和服务器库
json_rpc:JSON-RPC客户端和服务器库


图表区
