▲▲▲请问各位:在水晶报表10中,我只想要水晶报表导出的PDF文件,并且直接存贮在本地文件夹,不需要显示报表页面,该如何实现,在线等待!▲▲

javabeanzhang 2005-05-11 04:48:56
内容如题,在线等待,有答案立即结贴!!!谢谢!!
...全文
165 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
xwdd129 2005-06-06
  • 打赏
  • 举报
回复
水晶报表导出代码,供你参考一下:

public void ExportCrystalReport(DataSet myDS,string targetFileName,string reportPath,string docFormat,string passWrd)
{
ReportDocument oRD = new ReportDocument();
ExportOptions oExO ;
DiskFileDestinationOptions oExDo=new DiskFileDestinationOptions();
oRD.Load(reportPath);
oRD.SetDataSource(myDS);
oRD.Refresh();
this.SetConnectionInfo(oRD,passWrd);

oExDo.DiskFileName = targetFileName;
oExO = oRD.ExportOptions;
oExO.ExportDestinationType = ExportDestinationType.DiskFile;
switch (docFormat)
{
case "pdf":
oExO.ExportFormatType = ExportFormatType.PortableDocFormat;
break;
case "doc":
oExO.ExportFormatType = ExportFormatType.WordForWindows;
break;
case "xls":
oExO.ExportFormatType = ExportFormatType.Excel;
break;
case "htm":
oExO.ExportFormatType = ExportFormatType.HTML40;
break;
case "html":
oExO.ExportFormatType = ExportFormatType.HTML40;
break;
default:oExO.ExportFormatType = ExportFormatType.Excel;break;
}

oExO.DestinationOptions = oExDo;

oRD.Export();
oRD.Close();
}
liuchengit 2005-06-06
  • 打赏
  • 举报
回复
看看报表的export()方法,问题可解。
javabeanzhang 2005-05-19
  • 打赏
  • 举报
回复
今天北京天气比较灿烂,我up一下 ......
cqdyh 2005-05-14
  • 打赏
  • 举报
回复
观注
delbrueck 2005-05-13
  • 打赏
  • 举报
回复
可以实现的,但是代码长的是什么样子忘了,不懂。NET
javabeanzhang 2005-05-11
  • 打赏
  • 举报
回复
怎么没人呀?各位同仁这么早都下班了???

4,819

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧