在生成水晶报表时加载 [英] Loading while crystal report generates
本文介绍了在生成水晶报表时加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在从Crystal报表中获取数据以生成报表查看器.显示报告需要时间.
我想在加载数据时显示一个等待光标.我试图覆盖IsLoad()
方法.我没有实现它.如果有人知道,请帮助我.
I am fetching data from crystal report to report viewer. It takes time to show the report.
I want to show a wait cursor while loading data. I am trying to override IsLoad()
method. I fail to implement it. If any one knows, then kindly help me.
if (cmb_Status.Text == "Occupied")
{
OleDbDataAdapter adapter = new OleDbDataAdapter("select * from tbl_Bed where Status='Occupied'", con);
DataSet dss = new DataSet();
adapter.Fill(dss, "tbl_Bed");
if (dss.Tables["tbl_Bed"].Rows.Count > 0)
{
JeevanDeep.Report.ReportBedStatus bed = new JeevanDeep.Report.ReportBedStatus();
bed.SetDataSource(dss);
crystalReportViewer1.ReportSource = bed;
crystalReportViewer1.Zoom(50);
}
}
谢谢和问候,
Arshad
Thanks and regards,
Arshad
推荐答案
使用Cursor属性.仅此而已.
Use the Cursor property. that''s all.
if (cmb_Status.Text == "Occupied")
{
OleDbDataAdapter adapter = new OleDbDataAdapter("select * from tbl_Bed where Status='Occupied'", con);
DataSet dss = new DataSet();
adapter.Fill(dss, "tbl_Bed");
if (dss.Tables["tbl_Bed"].Rows.Count > 0)
{
this.Cursor = Cursors.WaitCursor;//Wait Cursor
JeevanDeep.Report.ReportBedStatus bed = new JeevanDeep.Report.ReportBedStatus();
bed.SetDataSource(dss);
crystalReportViewer1.ReportSource = bed;
crystalReportViewer1.Zoom(50);
this.Cursor = Cursors.Default;//Default Cursor
}
}
if (cmb_Status.Text == "Occupied")
{
Cursor = Cursors.WaitCursor;
OleDbDataAdapter adapter = new OleDbDataAdapter("select * from tbl_Bed where Status=''Occupied''", con);
DataSet dss = new DataSet();
adapter.Fill(dss, "tbl_Bed");
if (dss.Tables["tbl_Bed"].Rows.Count > 0)
{
JeevanDeep.Report.ReportBedStatus bed = new JeevanDeep.Report.ReportBedStatus();
bed.SetDataSource(dss);
crystalReportViewer1.ReportSource = bed;
crystalReportViewer1.Zoom(50);
}
Cursor = Cursors.Default;
}
这篇关于在生成水晶报表时加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文