Solved

server logon problems using vb6 and crystal9

Posted on 2004-09-27
12
407 Views
Last Modified: 2012-05-05
I have been reading problems and solutions on your forum pertaining to this for the last few hours and cannot get any solutions to work.  I have an active x connection on my VB form with a connection to the sq2000 view that the crystal report will need.  I have added the crviewer.  I get the message "logon failed for user myuserid"  I have supplied the user and password in the adodbc properties.  I have resupplied then in a further connection definition.  Somehow, crystal is not retaining these values.

0
Comment
Question by:dstratford
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 50 total points
ID: 12162952
Can you supply the code you are using?

mlmcc
0
 

Author Comment

by:dstratford
ID: 12163080
OK the basics are:
dim crystal as craxdrt.application
dim report as craxdrt.report
crviewer.displayborder = false
criewer.displaytabs = false
crviewer.enabledrilldown = false
crviewer.enablerefeshbutton = false

(after pressing start on form)
set crystal = new craxdrt.application
set report = crystal.openreport("the path" & "the report name")
crviewer.reportsource = report
crviewer.viewreport

(somehow crystal is loosing the logon values in the active x and I can't seem to find the correct syntax to pass them on
to crystal at the time crystal is logoning on to the server.  Have tried using
crystal.report.logonserver("crdb_ado.dll",the server,the database,the passwork) but I keep getting syntax errors.
and also substituting "pdsodbc.dll" for "crdb_ado.dl"l.  If I could get the correct syntax here, that might be the solution)
0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 300 total points
ID: 12163269
When you used logonserver did you specifiy the userID?  It's missing from your example above:

>> crystal.report.logonserver("crdb_ado.dll",the server,the database,the passwork)

Correct syntax is:  LogOnServer(pDllName as string,pServerName as String,[pDatabaseName],[pUserID],[pPassword])


0
 

Author Comment

by:dstratford
ID: 12163346
I did not use the user id as in a previous example on your forum DRRYAN3 omitted this.  I will try your syntax..do I put each value in quotes as he did? or do I need the square barackets?
deen
0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 300 total points
ID: 12163363
Quotes - the square brackets denote an optional parameter - if you specify password though you must specify user as well.
0
 

Author Comment

by:dstratford
ID: 12163780
I have tried the above and am still getting syntax errors...it is looking for an = sign at the end.  I am wondering if I even have these .dll files.  
Meanwhile, I see on www.crystaldecisions.com that this is a know issue and they have a fix.  I will try that and post the results at least sometime tommorrow.
Deen
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:dstratford
ID: 12164345
I have downloaded the crystal9  fix and retried my program with no success.
I get syntax error, expecting =  to the line:
crystal.report.logonserver("crdb_ado.dll","server name","dbname","userid","password")

Help!
0
 
LVL 4

Accepted Solution

by:
avi247 earned 150 total points
ID: 12165194
Try it this way

crystal.report.logonserver "crdb_ado.dll","server name","dbname","userid","password"

Or

conn = crystal.report.logonserver("crdb_ado.dll","server name","dbname","userid","password")
0
 

Author Comment

by:dstratford
ID: 12168414
I just tried both of your suggestions and I get the error message for that line:
"object does not support this property or method"

I have reviewed my VB references and components. Hope you are not giving up.
0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 300 total points
ID: 12168997
Have you tried removing the "crystal" reference from the call?  Since you've already executed "set report=..." you should be able to use report.logonserver "dll", "server", "dbname", "user", "pword"

frodoman
0
 

Author Comment

by:dstratford
ID: 12172818
Thank you so much for all your help.  My problem has been solved by the following 2 steps:
1.  Download the service pack from crystal decisions to allow the use of integrated security by adding a registry key and changing the value of this key to yes.  
2.  On the crystal report check the box for integrated security and leave userid and password blank.

This problem can be closed.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 12205863
Glad i could help

mlmcc
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Order table with macro 3 75
c# combobox autocomplete behavior 6 92
wordsWithout 49 79
Adding Namespace to the second node of the xml 16 30
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

707 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

16 Experts available now in Live!

Get 1:1 Help Now