最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
关于水晶报表10 的字报表数据填充和显示
时间:2022-07-02 23:41:27 编辑:袖梨 来源:一聚教程网
水晶报表10版本,不再上水晶报表9一样自动帮你给子报表set 记录集,需要你在程序中自己添加
protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1;
DataSet newDs = new DataSet();
。
。得到报表的数据集合set给newsDs
DataSet dstMain=biz.GetDataSetList(pStart, pEnd, pStoreName);
newsDs.Tables.Add(dstMain.Tables[0].Copy());//添加主报表数据集
DataSet dstPOS1 = new DataSet();
DataSet dstPOS2 = new DataSet();
dstPOS1 = biz.GetDataSetList(pStart, pEnd, pStoreName1);
dstPOS2 = biz.GetDataSetList(pStart, pEnd, pStoreName2);
newsDs.Tables.Add(dstPOS1.Tables[0].Copy());//添加子报表数据集
newsDs.Tables.Add(dstPOS2.Tables[0].Copy());//添加子报表数据集
。
Type m_Report_type = m_Assembly.GetType(ReportClassName);//ReportClassName是报表名
Object aa = m_Assembly.CreateInstance(m_Report_type.FullName);
ReportClass reportEngine = (ReportClass)m_Assembly.CreateInstance(m_Report_type.FullName);
for(int i=1;i
ReportDocument oSubreport=reportEngine.Subreports[i-1];
oSubreport.SetDataSource(newDs);
}
reportEngine.SetDataSource( newDs );
CrystalReportViewer1.ReportSource = reportEngine;
return;
相关文章
- 迷你世界中如何重新实名认证 06-03
- SimSD让扩散语言模型支持token级推测解码加速 06-03
- 怪物猎人:荒野攻略——狩猎笛基础操作介绍 06-03
- 失控进化基地建造攻略:全流程详解与高效布局技巧 06-03
- DECK分类法:依一致性×置信度标记LLM幻觉的可检测性 06-03
- 失控进化隐藏环境寻找方法 失控进化全隐藏环境位置与探索技巧 06-03