Guest_imported
New member
- Jan 1, 1970
- 0
Can anyone tell me how to export a report into a diffrent format for example a word doc and then save this directly into a sql server database. I am using crystal reports version 8 and sql server 7
My code to date is below
Sub ReportSave()
If Not isObject(session("oApp") Then
Set session("oApp" = Server.CreateObject("CrystalRunTime.Application"
End If
If isObject (session("oRpt") Then
Set oRpt = Nothing
End If
Set session("oRpt" = session("oApp".OpenReport("\\Wax116\catch22\Reports\test.rpt",1)
session("oRpt".MorePrintEngineErrorMessages = false
session("oRpt".EnableParameterPrompting = false
Set session("ExportOptions" = session("oRpt".ExportOptions
session("exportfilename" = "gaz"
session("ExportOptions".diskfilename = session("exportfilename"
session("ExportOptions".formattype = cint(14)
session("ExportOptions".destinationtype=1
session("oRpt".export false
set rs = server.createobject("adodb.recordset"
ssql = "insert into report(report)values('" & session("oPpt" & "')"
cn.execute sSQL
End Sub
cheers
gaz
My code to date is below
Sub ReportSave()
If Not isObject(session("oApp") Then
Set session("oApp" = Server.CreateObject("CrystalRunTime.Application"
End If
If isObject (session("oRpt") Then
Set oRpt = Nothing
End If
Set session("oRpt" = session("oApp".OpenReport("\\Wax116\catch22\Reports\test.rpt",1)
session("oRpt".MorePrintEngineErrorMessages = false
session("oRpt".EnableParameterPrompting = false
Set session("ExportOptions" = session("oRpt".ExportOptions
session("exportfilename" = "gaz"
session("ExportOptions".diskfilename = session("exportfilename"
session("ExportOptions".formattype = cint(14)
session("ExportOptions".destinationtype=1
session("oRpt".export false
set rs = server.createobject("adodb.recordset"
ssql = "insert into report(report)values('" & session("oPpt" & "')"
cn.execute sSQL
End Sub
cheers
gaz