Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old October 6th, 2003, 10:04 PM
Authorized User
 
Join Date: Oct 2003
Location: , , Singapore.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default LOGON FAILED!

 Hi!
I got error when I try to export the crystal report to pdf file :
Please help. this is the error :

Server Error in '/Web1' Application.
--------------------------------------------------------------------------------

Logon failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed.

Source Error:


Line 92: End With
Line 93:
Line 94: myReport.Export()
Line 95: Response.ClearContent()
Line 96: Response.ClearHeaders()


Source File: C:\Inetpub\wwwroot\Web1\CRviewB.aspx.vb Line: 94

Stack Trace:


[LogOnException: Logon failed.]
   .K(String 
, EngineExceptionErrorID  )
   .F(Int16 , Int32 )
   .E(Int16 )
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.Export(ExportRequestContext reqContext)
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.Export()
   CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Export()
   Web1.CRview1.btnExport_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Web1\CRviewB.aspx.vb:94
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
   System.Web.UI.Page.ProcessRequestMain()


------------------------------------------------------------------

this is my codes:


("Export" button)


    Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
        Dim myExportOptions As CrystalDecisions.Shared.ExportOptions
        Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions
        Dim myExportFile As String
        Dim myReport As New CrystalReport3()

        myExportFile = "C:\Documents and Settings\winniewong\Desktop\" & _
        Session.SessionID.ToString & ".pdf"

        myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions ()
        myDiskFileDestinationOptions.DiskFileName = myExportFile
        myExportOptions = myReport.ExportOptions

        With myExportOptions
            .DestinationOptions = myDiskFileDestinationOptions
            .ExportDestinationType = .ExportDestinationType.DiskFile
            .ExportFormatType = .ExportFormatType.PortableDocFormat
        End With

        myReport.Export()
        Response.ClearContent()
        Response.ClearHeaders()
        Response.ContentType = "application/pdf"
        Response.Write(myExportFile)
        Response.Flush()
        Response.Close()
    End Sub

Thanks.

  #2 (permalink)  
Old January 25th, 2005, 04:28 AM
Registered User
 
Join Date: Oct 2004
Location: s, s, Turkey.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sadiku
Default

i have same problem abou showing the report in report viewer .is there any one to solve that problem?



Similar Threads
Thread Thread Starter Forum Replies Last Post
logon failed serdarbyktmz Crystal Reports 0 April 18th, 2007 10:22 AM
LogOnException: Logon failed leoluvis Crystal Reports 0 February 7th, 2006 05:31 AM
Logon Failed! VannAustin BOOK: Professional Crystal Reports for VS.NET 0 March 3rd, 2005 05:13 AM
logon failed Rohit Ranjan Crystal Reports 1 February 28th, 2005 06:19 PM
Logon failed. msrnivas .NET Web Services 3 January 24th, 2005 02:56 PM





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