Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 23rd, 2004, 02:00 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Logon failed... exporting crystal reports into pdf

hey all out there... currently i have this project on hand and im really really stuck... can't seem to figure out where the problem lies in... im trying to export data from crystal reports into pdf file formats... but i keep on getting the same error.. which states "Logon failed"..

i'm using ms access database. connection to database has no errors.. that's y im so stucked...

can anybody out there pls help me out here.. really appreciate all the help i could get now... below is a sample of my codes...

the destination file path is taken via user's selection thru a folderbrowserdialog... have done all the checkings... the destination path and file names are all correct.. data has been properly extracted from an Access database... but the "logon failed" error still persists...


Code Sample...
--------------------------------------------------
DoWhile (dr2.Read())
For i = 0 To dr2.FieldCount - 1

outputfile = dr2(i).ToString.Replace("-", " ") & ".pdf"

'creating pdf files
doc.SetDataSource(ds)
Dim exportOpts As ExportOptions = doc.ExportOptions
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
Dim diskOpts AsNew DiskFileDestinationOptions
diskOpts.DiskFileName = outputfile
exportOpts.DestinationOptions = diskOpts
doc.Export()

Next i
Loop

dr2.Close()
conn2.Close()
ReturnTrue

Catch sqlex As OleDbException
MessageBox.Show("Invalid Database Format or Database Corrupted!", "Database Read Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
ReturnFalse
Catch ex As Exception
MessageBox.Show(ex.Message, "PDF Creation Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
ReturnFalse
EndTry

EndFunction


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting Crystal Reports to PDF using ASP.NET Gyto Crystal Reports 2 November 21st, 2006 11:53 PM
logon error while exporting crystal report hotshot_21 Crystal Reports 0 February 28th, 2006 06:37 AM
Crystal Report Logon failed mrleaps ASP.NET 1.0 and 1.1 Professional 1 October 13th, 2005 01:06 PM
Crystal Reports ActiveX Designer : Logon failed. thangna BOOK: Professional Crystal Reports for VS.NET 2 November 24th, 2004 05:37 AM
Crystal Reports ActiveX Designer Logon failed thangna Crystal Reports 1 November 11th, 2004 07:40 PM



All times are GMT -4. The time now is 08:05 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.