Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal ActiveX Control Methods
Message
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Produits tierce partie
Titre:
Crystal ActiveX Control Methods
Divers
Thread ID:
00648703
Message ID:
00648703
Vues:
51
Hi everybody!

I'm trying to use this two methods from the crystal reports control (LogOnServer, LogOffServer) but I can't find no help about the way to use them.
CrystalReportControl.LogOnServer <dll as string>, <server as string>, <database as string>, <userid as string>, <password as string>

CrystalReportControl.LogOffServer <id as integer>, <all as boolean>
for the logoffserver method I supose that if I specify all = true then it'll log off all connections.

For the LogOnServer method I don't know what to specify in the dll parameter.


Overview of my project and situation:
I have two SQL Server Registrations.
I have two databases named the same, and with the same structure.
(Server1.Name, Server2.Name)
I have several reports that access the database.
The application can specify in witch server to fetch the information.
The report is only displaying the records from the server i specified when i created the report.
If I modify the report and logon the new server then it works.

Maybe there's another way to solve this instead of using LogOnServer and LogOffServer.

Here's the code i'm using to print the report:
With Menu.CrystalReport1
   .Reset
   .ReportFileName = <ReportPath>
   .Connect = "driver={SQL Server};server=Server1;database=Name;uid=sa"
   .WindowTitle = Me.Caption
   .WindowState = crptMaximized
   .Action = 1
End With
Thanks in advance
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform