如何解决Crystal报告未在第二次运行时显示数据
我是水晶报告的新手。当我尝试执行某些选择的水晶报表时,它将显示数据。但是在第二次运行时,没有更改任何选择,该报告仅显示带有标题的空白。没有错误显示。我在第二次运行时在数据表中获得了相同的数据。但它显示空白报告。谁能告诉我如何解决这个问题?在这里,我附加了第一轮和第二轮。 This is the screen of crystal report after First run
这是在执行时调用的View Report方法。我两次运行相同的类型。第一次正确显示所有数据。
public void viewreport()
{
createreport();
crystalReportViewer1.ShowRefreshButton = false;
if (boolPrintOption == false)
{
if (cmbReportType.SelectedIndex == 1)
{
if (cmbCategory.SelectedIndex == 0)
{
if (this.InvokeRequired)
{
this.BeginInvoke((MethodInvoker)delegate()
{
crystalReportViewer1.ReportSource = report_FixedDetails;
});
}
else
{
crystalReportViewer1.ReportSource = report_FixedDetails;
}
}
else
{
if (this.InvokeRequired)
{
this.BeginInvoke((MethodInvoker)delegate()
{
crystalReportViewer1.ReportSource = report_FlxyMibcoDetail;
});
}
else
{
crystalReportViewer1.ReportSource = report_FlxyMibcoDetail;
}
}
}
else
{
if (cmbCategory.SelectedIndex == 0)
{
if (this.InvokeRequired)
{
this.BeginInvoke((MethodInvoker)delegate()
{
crystalReportViewer1.ReportSource = report_FixedSummary;
});
}
else
{
crystalReportViewer1.ReportSource = report_FixedSummary;
}
}
else
{
if (this.InvokeRequired)
{
this.BeginInvoke((MethodInvoker)delegate()
{
crystalReportViewer1.ReportSource = report_FlxyMibcoSummary;
});
}
else
{
crystalReportViewer1.ReportSource = report_FlxyMibcoSummary;
}
}
}
if (ds.Tables[0].Rows.Count == 0)
{
clsTVD6Message objMsg = new clsTVD6Message();
objMsg.ShowMessage("SAV6056");
return;
}
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。