Solved

server logon problems using vb6 and crystal9

Posted on 2004-09-27
12
408 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
This is about my first experience with programming Arduino.
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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

914 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

19 Experts available now in Live!

Get 1:1 Help Now