Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
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 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 July 23rd, 2004, 02:00 AM
Registered User
Join Date: Jul 2004
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
Dim exportOpts As ExportOptions = doc.ExportOptions
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
Dim diskOpts AsNew DiskFileDestinationOptions
diskOpts.DiskFileName = outputfile
exportOpts.DestinationOptions = diskOpts

Next i


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting Crystal Reports to PDF using ASP.NET Gyto Crystal Reports 2 November 22nd, 2006 12:53 AM
logon error while exporting crystal report hotshot_21 Crystal Reports 0 February 28th, 2006 07: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 06:37 AM
Crystal Reports ActiveX Designer Logon failed thangna Crystal Reports 1 November 11th, 2004 08:40 PM

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