最新下载
热门教程
- 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;
}
完成打印!
相关文章
- 如何高效整理Excel表格提升你的工作效率和数据分析-操作思路和注意点 09-02
- 掌握这些处理思路让你的Excel表格整理变得轻松要注意什么-核心信息和使用场景 09-02
- 如何通过整理Excel表格提升数据分析的效率与准确性-操作思路和注意点 09-02
- OceanBase 联接算法概述 09-02
- OceanBase 联接顺序 09-02
- OceanBase 执行计划管理 09-02