Click to See Complete Forum and Search --> : Crystal Reports 9 Export Nothing


gitter001
March 27th, 2008, 07:14 AM
Hello All

My web server was running under windows XP Pro IIS 5.1 including Crystal Report 9. I have tried to export dynamic crystal report as a pdf file format from web without using Activex Viewer Toolbar option. When I go for export using ASP it doesn’t gives any error but it doesn’t create any file, on the other hand it works fine with my VB6.0 Program. My code is below for consult. Can somebody please help me!

Thanks in advance
Gitter

My Code:
=====================================================

<%@ LANGUAGE="VBSCRIPT" %>

<%
reportname = "prod_list_prodcat_r.rpt"
%>
<!-- #include file="../Common/connection.inc" -->
<!-- #include file="reportruntime/AlwaysRequiredSteps.asp" -->

<%
Set oADORecordset = Server.CreateObject("ADODB.Recordset")

dim strSql
strSql="SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductID, Products.ProductName " & _
"FROM Products INNER JOIN " & _
"Categories ON Products.CategoryID = Categories.CategoryID "

Set oADORecordset = con.Execute(strSql)

Set oRptTable = session("oRpt").Database.Tables.Item(1)

oRptTable.SetDataSource oADORecordset, 3

'Export Purpose
Set oCrdRep = Server.CreateObject("CRAXDRT.Report")
Set oCrdRep = CRViewer.ReportSource
With oCrdRep
.ExportOptions.DiskFileName = "D:\" & session.SessionID & ".pdf"
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.FormatType = crEFTPortableDocFormat
.Export False
End With
%>

<!-- #include file="reportruntime/MoreRequiredSteps.asp" -->
<!-- #include file="reportruntime/SmartVieweractivex.asp" -->

jggtz
March 28th, 2008, 04:06 AM
I have no experience at all with exporting to pdf in that way, but to me, you are exporting the pdf file to a D: drive at the server...

Just a shot in the dark