【web of science】web下水晶报表的使用!

时间:2014-03-06  来源:报表/图形  阅读:
在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;
}
完成打印!




【web of science】web下水晶报表的使用!

http://m.bbyears.com/asp/4674.html

推荐访问:web服务器
相关阅读 猜你喜欢
本类排行 本类最新