【发布时间】:2016-11-30 19:12:36
【问题描述】:
我正在尝试在 Windows 窗体应用程序中将水晶报表导出为 pdf。我的水晶报表正在从 Mysql 数据库中获取数据。这是我的相同代码..
ReportDocument doc = new ReportDocument();
doc.Load("CrystalReport1.rpt");
doc.SetDataSource(dttable);
SaveFileDialog saveas = new SaveFileDialog();
saveas.Filter = "*.pdf|(PDF File)";
if (saveas.ShowDialog() == DialogResult.OK)
{
doc.ExportToDisk(ExportFormatType.PortableDocFormat, saveas.FileName + ".pdf");
MessageBox.Show("Report Exported !");
}
在运行上述代码时。我收到错误
doc.Load("CrystalReport1.rpt");行的“加载报告失败”
请帮我解决这个问题。
【问题讨论】:
标签: c# mysql winforms pdf crystal-reports