代码如下:报错为Invalid report file path.
private void btnExport_Click(object sender, System.EventArgs e)
{
ReportDocument myReport = new ReportDocument();
CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
myReport.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
myReport.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
DiskOpts.DiskFileName = "c:\\Output.pdf";
myReport.ExportOptions.DestinationOptions = DiskOpts;
myReport.Export();
}
private void btnExport_Click(object sender, System.EventArgs e)
{
ReportDocument myReport = new ReportDocument();
CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
myReport.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
myReport.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
DiskOpts.DiskFileName = "c:\\Output.pdf";
myReport.ExportOptions.DestinationOptions = DiskOpts;
myReport.Export();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货