Solved

VB6 Crystal Reports Logon failed

Posted on 2013-06-28
11
869 Views
Last Modified: 2013-07-08
Hey guys,

I am an intermediate user of VB6 and a beginner to Crystal. I am using the Reports Wizard to connect to my DB via ODBC, it asks for username and password, I enter it and it displays the table. I map the tables and it auto finds the Primary Key and Forign Keys. I chose the columns I want to display and I run the VB6 program. It returns error:

---------------------------
Crystal Report Viewer
---------------------------
Logon failed.
Details: 28000:[Sybase][ODBC Driver][SQL Anywhere]Invalid user ID or password [Database Vendor Code: -103 ]
---------------------------
OK  
---------------------------


But the username and password are correct. If they weren't, I would have never been able to see the tables in the first place. Going crazy over here. What am I missing?
0
Comment
Question by:triphen
  • 5
  • 5
11 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
What version of Crystal?

What code are you using for the reports?

mlmcc
0
 

Author Comment

by:triphen
Comment Utility
CR v11.5

Not sure what you mean by "What code are you using for the reports?" I used the report wizard to build a very simple report.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
For the report to display you need to add code to assign the report to the viewer and assign the logon information and any parameters the report needs.

mlmcc
0
 

Author Comment

by:triphen
Comment Utility
Oh, I didnt know that :)

Can you give me an example of what this code might look like?

Where would it be? Form Load?
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Depends on how the report is requested?
It could be on a form load.
I have also written apps where the code loading the information was subroutine on the form or even code on another form that works on the crViewer

Is there a form with the CRViewer?

Do you have references to crViewer.dll?

mlmcc
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:triphen
Comment Utility
Form Load says this:

Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

References attached
vb.png
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
WHere does the object Report gets its value?

You don't need both CR ActiveX references.  Remove the second one

mlmcc
0
 

Author Comment

by:triphen
Comment Utility
WHere does the object Report gets its value?
Good question :) I designed the report on the fly with the Wizard in VB. I havent really given it a "value"

Thanks! I will remove the other reference.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
Comment Utility
0
 

Author Closing Comment

by:triphen
Comment Utility
Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now