Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

server logon problems using vb6 and crystal9

Posted on 2004-09-27
12
Medium Priority
?
422 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
[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
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 150 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 900 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 900 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
 

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 450 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 900 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 101

Expert Comment

by:mlmcc
ID: 12205863
Glad i could help

mlmcc
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Progress
Introduction to Processes

719 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