Skip to Content
author's profile photo Former Member
Former Member

Logon Failed

Hi Everybody !

I´m facing some problems with CRXI + VB.net.

I´m using Crystal Activex Report Viewer Control 11.5 and when I try to view the report I get this error message "LOGON FAILED" ...

My code is .....

Dim Appl As New CRAXDRT.Application

Dim xReport As New CRAXDRT.Report

Dim i As Integer

xReport = Appl.OpenReport("C:SistemasSICSICRelatorios" & NomeRelatorio & "")

For i = 1 To xReport.Database.Tables.Count

xReport.Database.Tables(i).ConnectionProperties.DeleteAll()

xReport.Database.Tables(i).ConnectionProperties.Add("DSN", "bdsme")

xReport.Database.Tables(i).ConnectionProperties.Add("User ID", "sic")

xReport.Database.Tables(i).ConnectionProperties.Add("Password", "cis")

xReport.Database.Tables(i).ConnectionProperties.Add("Database", "bdsme")

xReport.Database.Tables(i).ConnectionProperties.Add("UseDSNProperties", True)

Next i

crviewer.EnableExportButton = True

crviewer.EnablePrintButton = True

crviewer.ReportSource = xReport

crviewer.ViewReport()

Any ideas ???

I will be thankfull for any help ...

Sorry by my english, I am brazilian.

Hugs

Robson

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2008 at 07:50 PM

    Hi, Binho;

    First, please be aware that our ActiveX Viewer was designed for VB 6, and has not been tested, and is no supported in .NET.

    Unless you are changing databases completely, it should not be necessary to call the DeleteAll method.

    Try using our Connection Properties document (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81) to set the code just to log on.

    ie:

    'Declare a Connection Info Object

    Dim ConnectionInfo As CRAXDRT.ConnectionProperties

    'Set the Connection Info to Connection Properties of u2018the table object

    Set ConnectionInfo = Report.Database.Tables(1).ConnectionProperties

    'Set the ODBC DSN

    ConnectionInfo.Item(u201CDSNu201D) = u201CODBC DSNu201D

    'Set the database name

    ConnectionInfo.Item(u201CDatabaseu201D) = u201CDatabase nameu201D

    'Set the user name

    ConnectionInfo.Item(u201CUser IDu201D) = u201CUser nameu201D

    'Set the password

    ConnectionInfo.Item(u201CPasswordu201D) = u201CPasswordu201D

    'Set the fully qualified table name if different from u2018the original data source

    Report.Database.Tables(1).Location = u201Cdatabase.owner.tablenameu201D

    Regards,

    Jonathan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 01, 2008 at 02:05 PM

    Binho, you are using the Report Designer Component (RDC) in .NET. This component has not been tested in .NET and is thus not supported in .NET. Also, the RDC has been retired in CR 2008, which is the currently shipping version of Crystal Reports. I would highly recommend that yo use the Crystal Reports assemblies for .NET for your application. Help can be found here:

    http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

    C:\Program Files\Business Objects\Crystal Reports 11.5\Help\en\crsdk_samples_aspx\data\crsdk_net_tutorials_115_en.zip

    C:\Program Files\Business Objects\Crystal Reports 11.5\Help\en\crsdk_net_doc\doc\crsdk_net_doc.chm

    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm

    https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe

    https://smpdl.sap-ag.de/~sapidp/012002523100006252712008E/csharp_web_smpl.exe

    https://smpdl.sap-ag.de/~sapidp/012002523100006252812008E/net_web_smpl.exe

    http://vbcity.com/forums/faq.asp?fid=54&cat=Crystal%20Reports

    Ludek

    Add a comment
    10|10000 characters needed characters exceeded

    • Binho, make this as simple as you can, gain experience and confidence as you go.

      1) Create as simple a report as you can; One field. Make sure the report works inthe designer. No subreports

      2) Plug it into a sample windows app (don't start with web app as you introduce all kinds of variables there)you can download from here:

      https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe

      The app I want you to use is in the above self extracting exe and is called vbnet_win_engine

      3) If the above works, add one of your reports, that does NOT have a subreport. Make that work

      4) Add a report that has a subreport, if you have one, make that work

      5) Now that you have some success with the above, move over to your app and match the success.

      Ludek

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.