triphen
asked on
VB6 Crystal Reports Logon failed
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?
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?
ASKER
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.
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.
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
mlmcc
ASKER
Oh, I didnt know that :)
Can you give me an example of what this code might look like?
Where would it be? Form Load?
Can you give me an example of what this code might look like?
Where would it be? Form Load?
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
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
ASKER
Form Load says this:
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
References attached
vb.png
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
References attached
vb.png
WHere does the object Report gets its value?
You don't need both CR ActiveX references. Remove the second one
mlmcc
You don't need both CR ActiveX references. Remove the second one
mlmcc
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
What code are you using for the reports?
mlmcc