Jump to content

Crystal Reports Viewer COM error


ptrex
 Share

Recommended Posts

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.

Link to comment
Share on other sites

Link to comment
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,

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...