asp.net中crystal report转成excel格式问题,如何保证表格和数据格式不改变?急~~~

kastol 2003-08-25 10:08:14
asp.net中crystal report转成excel格式问题,如何保证表格和数据格式不改变?急~~~
...全文
68 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
afdo 2003-09-16
  • 打赏
  • 举报
回复
注意用Border
kastol 2003-09-15
  • 打赏
  • 举报
回复
有了,等我试试
kastol 2003-09-15
  • 打赏
  • 举报
回复
为什么我没有ExcelFormatOptions,要加什么引用?
afdo 2003-09-12
  • 打赏
  • 举报
回复
加些如下code:
ExcName = ".xls";
crDiskFileDestinationOptions.DiskFileName = ExportPath + FileName + ExcName;
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.Excel;
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
ExcelFormatOptions crExcelFormatOptions=new ExcelFormatOptions();
crExcelFormatOptions.ExcelTabHasColumnHeadings=false;
crExcelFormatOptions.ExcelUseConstantColumnWidth=false;
crExportOptions.FormatOptions=crExcelFormatOptions;

Try it.
applely13 2003-09-11
  • 打赏
  • 举报
回复
我也碰到过这个问题一直没解决,没办法道成WORD 格式了
kastol 2003-09-11
  • 打赏
  • 举报
回复
.......晕等待了好多天了,,,,,55555
zhbname 2003-09-11
  • 打赏
  • 举报
回复
關注
derek 2003-09-08
  • 打赏
  • 举报
回复
寫錯了,應該是: 用CrystalReport的輸出(export)恐怕不行
derek 2003-09-08
  • 打赏
  • 举报
回复
好像要直接寫入到excel去, 用CrystalReport的輸入恐怕不行.
win911 2003-09-08
  • 打赏
  • 举报
回复
gz
kastol 2003-09-08
  • 打赏
  • 举报
回复
那要怎么办?解决方案~~~~solution~~~~~
kastol 2003-08-25
  • 打赏
  • 举报
回复
请问直接使用什么意思?分常感谢你的帮助
维她奶 2003-08-25
  • 打赏
  • 举报
回复
gz
kastol 2003-08-25
  • 打赏
  • 举报
回复
用代码?
在asp.net中我是用

Private Function BindReport() As CRAcceptUser
Dim Ob_CRAcceptUser As New CRAcceptUser()
Dim Ob_DSAcceptUser As New DSAcceptUser()
Dim MyConn As SqlConnection = New SqlConnection(SqlConnString.ToString())
MyConn.Open()
Dim SqlString As String = "......"
Dim MyAdapter As SqlDataAdapter = New SqlDataAdapter(SqlString, MyConn)
MyAdapter.Fill(Ob_DSAcceptUser, "RPAcceptUser")
Ob_CRAcceptUser.SetDataSource(Ob_DSAcceptUser)
Me.CRVAcceptUser.ReportSource = Ob_CRAcceptUser
Me.CRVAcceptUser.DisplayToolbar = False
BindReport = Ob_CRAcceptUser
End Function


Private Sub BtnExXLS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExXLS.Click
Dim Ob_DiskFileDestinationOptions As New CrystalDecisions.Shared.DiskFileDestinationOptions()
Dim Ob_CRAcceptUser As New CRAcceptUser()
Ob_CRAcceptUser = BindReport()'返回的是Ob_CRAcceptUser的crystalreport对象
Ob_CRAcceptUser.ExportOptions.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
Ob_CRAcceptUser.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.WordForWindows


Ob_DiskFileDestinationOptions.DiskFileName = "c:\\ReportOutPutFile.doc"
Ob_CRAcceptUser.ExportOptions.DestinationOptions = Ob_DiskFileDestinationOptions
Ob_CRAcceptUser.Export()
Response.Redirect("c:\ReportOutPutFile.xls")
End Sub
雪狼1234567 2003-08-25
  • 打赏
  • 举报
回复
你直接用 crystalreport的存贮功能,它就不会变
kastol 2003-08-25
  • 打赏
  • 举报
回复
在线等待中
kastol 2003-08-25
  • 打赏
  • 举报
回复
急~~~
kastol 2003-08-25
  • 打赏
  • 举报
回复
急~~~~~
kastol 2003-08-25
  • 打赏
  • 举报
回复
我装了9.2了阿,你说报表上的toolbar上有winform中的那个按钮吗?没有啊。。。。
请教能具体点吗?
tibet 2003-08-25
  • 打赏
  • 举报
回复
用crystal report 9就可以在web上直接导出成execl文件

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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