50分 新手请教 windows中 reportview控件的使用 新手请教 windows中 reportview控件的使用(详细步骤)谢谢我这里怎么都显示不了 主要想看数据源 源代码等 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try { aReportDocument.Load(@Application.StartupPath + "\\自定义单据\\" + g_单据类型 + ".rpt"); } catch (Exception) { MessageBox.Show("去把rpt文件放在路径: \\KySoft\\bin\\Debug\\自定义单据 ."); return; } foreach (Table aTable in aReportDocument.Database.Tables) { aTable.LogOnInfo.ConnectionInfo.ServerName = "数据源名称"; aTable.LogOnInfo.ConnectionInfo.DatabaseName = "数据库名称"; aTable.LogOnInfo.ConnectionInfo.UserID = "用户名称"; aTable.LogOnInfo.ConnectionInfo.Password = "用户密码"; aTable.ApplyLogOnInfo(aTable.LogOnInfo); } 完整的使用步骤有吗 我在界面添加数据源 报表也设计好了 我的代码private void Form1_Load(object sender, EventArgs e) { DataTable dt = ReportViewerLib.Customer.GetData("selectproduct", 2);//自己写的掉存储过程方法 ReportDataSource rds = new ReportDataSource("aaaa",dt); ReportParameter rp = new ReportParameter("SubTitle", "List of all the customers"); this.reportViewer1.LocalReport.DataSources.Add(rds); this.reportViewer1.RefreshReport(); } 大哥 存储过程 实现都写好了 都掉方法了!!! 类里面方法已经写好!! dt是返回来的 数据!! DataTable dt = ReportViewerLib.Customer.GetData("selectproduct", 2);//自己写的掉存储过程方法 给提示下怎么实现这个功能 c#中如何实现打印功能??? 开始学习c#,问个简单的问题 [请教]为什么有了公共变量还要使用属性? datatable的select问题! 元旦散分了,各位朋友接婚了 数据连接文件UDL的用法? 羞愧,入门安装,在线等············ 用C#如何实现象Office助手的功能(浮在最上层,可以任意拖动)????????? C#能成为主流的编程工具吗?谁能说服我放弃VC,Delphi,改用C#. C#模拟post总是未登录 打开MS SQL服务器的文件夹列表
try
{
aReportDocument.Load(@Application.StartupPath + "\\自定义单据\\" + g_单据类型 + ".rpt");
}
catch (Exception)
{
MessageBox.Show("去把rpt文件放在路径: \\KySoft\\bin\\Debug\\自定义单据 .");
return;
} foreach (Table aTable in aReportDocument.Database.Tables)
{
aTable.LogOnInfo.ConnectionInfo.ServerName = "数据源名称";
aTable.LogOnInfo.ConnectionInfo.DatabaseName = "数据库名称";
aTable.LogOnInfo.ConnectionInfo.UserID = "用户名称";
aTable.LogOnInfo.ConnectionInfo.Password = "用户密码"; aTable.ApplyLogOnInfo(aTable.LogOnInfo);
}
{
DataTable dt = ReportViewerLib.Customer.GetData("selectproduct", 2);//自己写的掉存储过程方法
ReportDataSource rds = new ReportDataSource("aaaa",dt);
ReportParameter rp = new ReportParameter("SubTitle", "List of all the customers");
this.reportViewer1.LocalReport.DataSources.Add(rds);
this.reportViewer1.RefreshReport();
}
DataTable dt = ReportViewerLib.Customer.GetData("selectproduct", 2);//自己写的掉存储过程方法