Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving crystal a report to an sql server databse

Status
Not open for further replies.

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
 
>> for example a word doc and
>> then save this directly
>> into a sql server database

save what? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top