Results 1 to 4 of 4

Thread: Connection Error While Previewing Report

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Location
    New Delhi
    Posts
    2

    Connection Error While Previewing Report

    Dear Members,
    I have designed a report using Crystal Report 10, and take front end as Visual Basic 6.0 and backend as Sql Server 2000.

    At the design time of report creation using ODBC connection every thing is perfectly going on. but when attached with the Front End V.B 6.0
    and executing the Application with same odbc connection ,
    while previewing a report i got an error Message mentioned below:

    "Logon Failed.
    Details:28000:[Microsoft][ODBC Sql Server Driver][Sql Server] Login Failed For User 'abc'"


    I have used ODBC DSN Connection for setting the datasource property , code is given below

    Set crxApp = New CRAXDRT.Application
    Set crxRepo = New CRAXDRT.Report

    Dim reportPath As String
    reportPath = App.path & "\reports\" & fileName

    Set crxRepo = crxApp.OpenReport(reportPath)
    crxRepo.DiscardSavedData

    ConnectionReport = "dsn=dsnName;uid=abc;pwd=abc"
    crxRepo.Database.SetDataSource (ConnectionReport)
    crxRepo.RecordSelectionFormula = selectFormula
    crview.RefreshEx True

    '-- crview is a crystal report viewer control object

    crview.Refresh
    crview.ReportSource = crxRepo

    '-- Error Prompts when control reaches at below mentioned line

    crview.ViewReport

    Please help me to overcome this problem. I will be thankful to you.

    Sachin

  2. #2
    Lively Member
    Join Date
    Sep 2005
    Location
    Glasgow, Scotland
    Posts
    77

    Re: Connection Error While Previewing Report

    Has the user been granted SQL Server permissions for the database or tables that you're trying to report on? What's your network infrastructure? We're using Windows 2003, and I've got a group created in Active Directory into which I place anyone that's going to be using my Crystal Reports. That way, as long as that AD group is set up for access to the appropriate database, and as long as the individual users are all in that group, everything should come up smelling of roses.
    Wise man once said: "Don't ever get married, just find a woman you don't like and buy her a house".
    According to ancient Chinese proverb, "Man with hole in pocket feels cocky all day".

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Location
    New Delhi
    Posts
    2

    Re: Connection Error While Previewing Report

    Dear Sir,
    I am developing a software for our client
    the configuration is
    visual basic 6.0 for front end design
    Crystal Report 10 for reports
    Sql Server 2000 as datasource on remote machine.
    and administrator granted all privileges for reading
    data from the database to the user.

    Sachin

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Connection Error While Previewing Report

    What method of authentication is being used? Windows or SQL Server?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width