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 June 28th, 2005, 11:40 AM
Authorized User
 
Join Date: Jun 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default type not defined - crystal report

Hi!

I am trying to export to PDF using vb.net and crystal.

here is the code that i am using:

Private Sub Export()

Dim ExportPath As String = Request.PhysicalApplicationPath

Dim crReportDocument As CrystalReport1 = New CrystalReport1()
crReportDocument.SetDataSource(Me.DataSet1)


crDiskFileDestinationOptions = New DiskFileDestinationOptions
crExportOptions = crReportDocument.ExportOptions
Session("filename") = Session.SessionID.ToString() & ".pdf"
crDiskFileDestinationOptions.DiskFileName = ExportPath & Session("filename").ToString()
crExportOptions.DestinationOptions = crDiskFileDestinationOptions
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
crReportDocument.Export()
Response.Redirect("WebForm2.aspx")

End Sub

i have imported the crytal namespaces that i need and i have added references to the project too.

i have a crystal report called CrystalReport1 also.

but i keep getting the error "Type 'CrystalReport1' is not defined"

Would really appreciate any help on this.

thanks and regards


 
Old March 15th, 2006, 03:42 PM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you ever find a solution to this problem. I am having the same problem too.
 
Old March 16th, 2006, 12:19 PM
Authorized User
 
Join Date: Jun 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi thussey,
i went about it a totally differnt way. if you lok up the business object web site there is a pdf doc on how to create crystal reports using visual studio 2005 - cant find the documnet now - i must have deleted.

http://www.businessobjects.com/produ...e/net/2005.asp



 
Old November 27th, 2006, 01:45 PM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This might help.

http://forums.asp.net/thread/1364045.aspx






Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
Type 'RecordDeletedEvent' is not defined sstuber BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 May 21st, 2008 04:51 PM
How do i do this type of crystal report? deepgfishing Crystal Reports 2 June 12th, 2006 02:22 PM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
Type is not defined mdbriggs BOOK: Professional Crystal Reports for VS.NET 0 April 8th, 2005 08:20 AM





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