Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2006, 04:53 PM
dw dw is offline
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default CR XI Rel 2 Upgrade - now no PDFs

I upgraded my workstation with CR XI Rel 2 and when I opened my Visual Studio 2003 web project, VS insisted on updating my Crystal Reports references. Then I had to update the web server with the CR XI Rel 2 .NET Server Install.

Tried to run the web app which serves up a PDF and got a couple of errors regarding unable to find CrystalDecisions.ReportAppServer.CommLayer and CrystalDecisions.ReportAppServer.DataSetConversion . Added references for those assemblies and no more errors.

HOWEVER, now the PDFs don't get served up either. Just get a blank page.

I haven't bumped the app up to VS 2005 as I want to get CR working first before I tackle converting to the new format. The web app is registered to run under ASP.NET 2.0 however, even though it is still being developed on VS 2003, thus no .NET 2.0 specific calls.

A copy of the code that worked before the CR XI Rel 2 update follows. It's sole mission is that if a user browses to this page, it takes two session variables, passes them in as parameters and outputs a PDF of the report. Worked fine until this morning's upgrade issues. What am I missing?

Thanks -- Doug

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim _email As String
Dim _ShipId As String
Dim _ShipName As String
_email = Session("email")
_ShipId = Session("ShipId")
_ShipName = Session("ShipName")
If (_email = "" Or _ShipId = "" Or _ShipName = "") Then
Response.Redirect("missingparams.aspx")
End If

Dim myExportOptions As CrystalDecisions.Shared.ExportOptions
Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
Dim myExportFile As String
Dim myReport As New Section1_rpt

myExportFile = "D:\Inetpub\wwwroot\projects\PrintOuts\" & Session("ShipID") & "_Section01_" & Date.Now().Year.ToString & _
Date.Now().Month.ToString & Date.Now().Day.ToString & Date.Now().Hour.ToString & _
Date.Now().Minute.ToString & Date.Now().Second.ToString & ".pdf"
myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
myDiskFileDestinationOptions.DiskFileName = myExportFile
myExportOptions = myReport.ExportOptions
myReport.SetDatabaseLogon("*blanked out*", "*blanked out*")
myReport.SetParameterValue("ShipID", Session("ShipID"))

With myExportOptions
.DestinationOptions = myDiskFileDestinationOptions
.ExportDestinationType = .ExportDestinationType.DiskFile
.ExportFormatType = .ExportFormatType.PortableDocFormat
End With
myReport.Export()

Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(myExportFile)
Response.Flush()
Response.Close()
System.IO.File.Delete(myExportFile)
End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on Visual Basic 6 Install File with CR XI R2 jmss66 Crystal Reports 0 August 25th, 2008 10:41 AM
CR XI Access System database in asp.net 2.0 rturner003 ASP.NET 2.0 Professional 0 October 22nd, 2007 09:50 AM
CR XI Report printing in Landscape instead of Port jdaulagar Beginning VB 6 0 March 2nd, 2007 01:46 PM
CR XI left outer joins not working saied80 Crystal Reports 0 January 17th, 2007 12:41 PM
Create report using untyped dataset & CR XI ? vijaykumartaduri BOOK: Professional Crystal Reports for VS.NET 0 October 20th, 2005 10:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.