读书人

关于水晶报表导出的有关问题!

发布时间: 2012-03-08 13:30:13 作者: rapoo

关于水晶报表导出的问题!!急!
代码如下:报错为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();
}

[解决办法]
UP

读书人网 >asp.net

热点推荐