如何将水晶报表保存为文本文档?

caibirdyb 2003-11-12 11:18:38
水晶报表自带的保存类型中没有文本文档,如何实现存为文本文档?
在线等,急!!!
...全文
56 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
hongpeng7981 2004-01-05
  • 打赏
  • 举报
回复
真的是高手!
sky125 2003-12-30
  • 打赏
  • 举报
回复
mark
qazsw 2003-12-27
  • 打赏
  • 举报
回复
安装个9.2的,自带功能
wangbear 2003-12-27
  • 打赏
  • 举报
回复
9.0版本可以导出为PDF\doc\txt\xls等多种形式
jarli 2003-12-22
  • 打赏
  • 举报
回复
VS2003自带的水晶报表的版本为9.1
swordmanli 2003-12-17
  • 打赏
  • 举报
回复
导成word,excel,pdf

private void ExportToFile(String filetype)
{
//设置报表参数
this.InitReportParms();


//设置导出格式
switch(filetype)
{
case "excel":
report.ExportOptions.ExportFormatType = ExportFormatType.Excel;
break;
case "word":
report.ExportOptions.ExportFormatType = ExportFormatType.WordForWindows;
break;
case "pdf":
report.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
break;
}

report.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

//设置导出文件名
DiskFileDestinationOptions file = new DiskFileDestinationOptions();
string file_suffix = null;

switch(filetype)
{
case "excel":
file_suffix = ".xls";
file.DiskFileName = Request.PhysicalApplicationPath + "\\tmp\\" + this.GetType().Name + file_suffix;
break;
case "word":
file_suffix = ".doc";
file.DiskFileName = Request.PhysicalApplicationPath + "\\tmp\\" + this.GetType().Name + file_suffix;
break;
case "pdf":
file_suffix = ".pdf";
file.DiskFileName = Request.PhysicalApplicationPath + "\\tmp\\" + this.GetType().Name + file_suffix;
break;

}
report.ExportOptions.DestinationOptions = file;

report.Export();

Response.Redirect("tmp/" + this.GetType().Name + file_suffix);
Response.End();
}
caibirdyb 2003-11-24
  • 打赏
  • 举报
回复
我的是VS2003带的水晶报表,不知道版本
rocllllll 2003-11-19
  • 打赏
  • 举报
回复
我的8.5可以导出为txt格式(用打印御览中的导出)
caibirdyb 2003-11-14
  • 打赏
  • 举报
回复
我要输出的是.txt格式的文本文档。
samuelpan 2003-11-13
  • 打赏
  • 举报
回复
8.0带的啊

6,107

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 数据库报表
社区管理员
  • 数据库报表社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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