asp.net水晶报表-主从表关联问题
来源:互联网 发布:天涯明月刀男脸型数据 编辑:程序博客网 时间:2024/06/05 18:30
二、通过Sql语句筛选数据
三、建立和主从表的关联
四、注意在CrystalReport1表中插入子报表的时候,一定要将主从表的关联字段设置好,否则出乱子
主体代码如下:
/// <summary>
/// Bind CrystalReport
/// </summary>
/// <param name="strS">sql</param>
private void bdReport(string strS)
{
oCR = new CrystalReport1();
SqlConnection cnn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionSqlServer"]);
SqlDataAdapter cmd1 = new SqlDataAdapter(strS,cnn);
//Create and fill the DataSet.
DataSet2 ds = new DataSet2();
cmd1.Fill(ds,"meeting");
// SqlDataAdapter cmd2 = new SqlDataAdapter("select * from realplan where rplanid in (select top 10000 planid from (" sqlStr ")as a order by planid)", cnn);
SqlDataAdapter cmd2 = new SqlDataAdapter(SqlIsOper, cnn);
cmd2.Fill(ds,"realplan");
//Create the relation between the Authors and Titles tables.
ds.Relations.Add("mo",
ds.Tables["meeting"].Columns["planid"],
ds.Tables["realplan"].Columns["rplanid"]);
//binding reportViewer
oCR.SetDataSource(ds);
this.CrystalReportViewer1.ReportSource = oCR;
//Close the connection.
cnn.Close();
}
http://skylaugh.cnblogs.com/archive/2006/05/22/406520.html
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>- asp.net 水晶报表--主从表关联问题
- asp.net水晶报表-主从表关联问题
- 水晶报表主从表的关联
- ASP.NET 水晶报表 文本换行问题
- ASP.NET水晶报表
- Asp.net 水晶报表
- [水晶报表]Asp.net调用水晶报表
- asp.net web水晶报表
- asp.net操作水晶报表
- Asp.NET使用水晶报表
- ASP.NET 水晶报表使用
- ASP.net 2.0中水晶报表迁移部署问题
- 水晶报表中的主从表结构
- 水晶报表中的主从表结构
- 水晶报表中的主从表结构
- 补: ASP.Net中使用水晶报表!
- ASP.NET中水晶报表的使用
- Asp.Net中使用水晶报表
- 在ASP.NETAtlas中调用WebService—批量调用以提高效率
- ASP.NET2.0中配合MasterPage使用的优化CSS模型
- SOA架构暴露固有缺陷 CIO应时刻警惕
- ASP.net在页面所有内容生成后、输出内容前对页面内容进行操作
- Effective Using LINQ To SQL (1) - 分頁技巧
- asp.net水晶报表-主从表关联问题
- 由于未处理服务器端代码而导致ASP.NET页出现意外情况
- 对asp.net1.1开发模板类的一些修改说明
- SOA的模型行为
- 解决错误:sql_variantisincompatiblewithxml(ASP.NET2.0/XML数据类型)
- 在.net中使用GDI来提高gif图片的保存画质
- ASP.NET2.0新特性概述
- 11111
- asp.net2.0如何加密数据库联接字符串