Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB6 Crystal Reports Logon failed

Posted on 2013-06-28
11
Medium Priority
?
939 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39288102
What version of Crystal?

What code are you using for the reports?

mlmcc
0
 

Author Comment

by:triphen
ID: 39288425
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 101

Expert Comment

by:mlmcc
ID: 39288550
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:triphen
ID: 39288595
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 101

Expert Comment

by:mlmcc
ID: 39288607
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
 

Author Comment

by:triphen
ID: 39307802
Form Load says this:

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

References attached
vb.png
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39308020
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
ID: 39309059
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 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39309116
0
 

Author Closing Comment

by:triphen
ID: 39309129
Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

722 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