最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
web下水晶报表的使用!
时间:2022-07-02 11:23:42 编辑:袖梨 来源:一聚教程网
在web水晶报表的使用。
首先
需要在.aspx.cs文件中引入:using CrystalDecisions.CrystalReports.Engine;
创建.xsd文件和.rpt文件,.xsd文件其实是在.aspx.cs中创建的DataSet中的字段的映射。(可以添加,修改)。
然后
在.aspx.cs文件中操作,
ReportDocument oCR =null;
DataSet ds = data.GetDataSet();
oCR = new R_StandardAuditPrint();
oCR.SetDataSource(ds);
crvMainView.ReportSource=oCR; //CrystalDecisions.Web.CrystalReportViewer crvMainView 报表浏览器
其次
需要注意是,在 .aspx文将中,设置CRYSTALREPORTVIEWER的一些属性,
最后
在.aspx的btnprint.onclick事件中调用(javascript)
function printpage(m_printpage)
{
var newstr = document.all.item(m_printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = newstr; window.print();
document.body.innerHTML = oldstr;
return true;
}
完成打印!
首先
需要在.aspx.cs文件中引入:using CrystalDecisions.CrystalReports.Engine;
创建.xsd文件和.rpt文件,.xsd文件其实是在.aspx.cs中创建的DataSet中的字段的映射。(可以添加,修改)。
然后
在.aspx.cs文件中操作,
ReportDocument oCR =null;
DataSet ds = data.GetDataSet();
oCR = new R_StandardAuditPrint();
oCR.SetDataSource(ds);
crvMainView.ReportSource=oCR; //CrystalDecisions.Web.CrystalReportViewer crvMainView 报表浏览器
其次
需要注意是,在 .aspx文将中,设置CRYSTALREPORTVIEWER的一些属性,
最后
在.aspx的btnprint.onclick事件中调用(javascript)
function printpage(m_printpage)
{
var newstr = document.all.item(m_printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = newstr; window.print();
document.body.innerHTML = oldstr;
return true;
}
完成打印!
相关文章
- 无畏契约源能行动不死鸟实战 玩法技巧分享 07-12
- Opyn的顶尖人才转投Coinbase,战略重心转向链上衍生品 07-12
- 原神伊涅芙配队怎么配 伊涅芙最强配队推荐 07-12
- 无畏契约源能行动雷兹实战 玩法技巧分享 07-12
- 梦幻西游铸魂任务怎么做-铸魂任务攻略 07-12
- 剑星全钓鱼点与限定稀有鱼在哪里 钓鱼点及稀有鱼位置分享 07-12