Sign in to follow this  
Followers 0
ptrex

Crystal Reports Viewer COM error

4 posts in this topic

When I us the Crystal reports Viewer COM object, I get an error when specifying the LogOnserver parameters.

$oCrystal.LogOnServer "servertype", "servername", "databasename", "user", "password"

If have used different methods to accomplish this, like

$oCrystal.LogOnServer "servertype", _
"servername", _
"databasename", _
"user", _
"password"

and 

$oCrystal.LogOnServer "servertype", _
& "servername", _
& "databasename", _
& "user", _
& "password"

And using variables

$oCrystal.LogOnServer $servertype, $servername$, $databasename$, $user, $password

The error I am getting is

We intercepted a COM error

Invalid number of parameters

Error 8002000E

It seem that only the 1st parameter is read or none of the parameters, after the LogOnServer property.

Can some point me out what is going wrong.

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

@SvenP

Problem solved.

The syntax is a litle different than in VB.

The solution is to us brackets after the .LogOnServer statement like this.

$oCrystal.LogOnServer ("servertype", "servername", "databasename", "user", "password")

Slowly we are getting there.

Hopefully this can help the other developers.

Regards,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0