主题:【求助】VB.Net高手们进来瞅一瞅啦, CR问题 -- MacArthur
Sub generateCryatalReport(ByVal strReportName As String)
Dim datatable As System.Data.DataTable = dsWKIT.Tables(0)
Dim Application As New Excel.Application()
Application.SheetsInNewWorkbook = 1
Dim wb As Excel.Workbook = Application.Workbooks.Add()
Dim ws As Excel.Worksheet = wb.Worksheets("Sheet1")
ws.Name = strReportName
Dim rowIndex As Integer
Dim colIndex As Integer
Try
...
Catch ex As System.Runtime.InteropServices.COMException
finally
wb.SaveAs("C:\" & strReportName & ".xls")
wb.Close()
Application.Quit()
if not wb is nothing then marshal.releasecomobject(wb)
if not ws is nothing then marshal.releasecomobject(ws)
if not application is nothing then marshal.releasecomobject(application)
wb=nothing:ws=nothing:application=nothing
gc.collect()
End Try
End Sub
- 相关回复 上下关系8
😄CrystalReport去死吧 1 MacArthur 字1877 2006-11-17 16:30:07
🙂用EXCEL做chart一样方便 1 晓晴夕照 字401 2006-12-04 15:59:00
🙂谢谢,献花 MacArthur 字102 2006-12-04 17:04:53
🙂see the text in red
🙂直接填数据这招狠 lanchong 字53 2006-11-17 21:51:55
🙂不晓得是啥问题~~ 1 并非马甲 字117 2006-11-08 07:29:37
🙂多谢 1 MacArthur 字0 2006-11-08 08:54:57
🙂这个问题碰到过,是CR在打包时没有注册的问题! 1 nettman 字174 2006-11-08 05:31:40