crystal report logon server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

I have been using crystal report with visual basic 6. I know with crystal
report & sql server, if there is a different server name than the one you
created report. It prompts as Unable to Logon server.

I used to use the following code in vb6 which worked perfectly fine with vb6
to connect to any server.

Dim tlb As CRAXDDRT.DatabaseTable

For Each tbl In Report.Database.Tables
tbl.SetLogOnInfo DBServer, dBName, DBUser, DBPassword
Next

Report.Database.LogOnServer "PDSSQL", DBServer, dBName, DBUser, DBPassword

With code given above I can connect to any given server. But now I'm using
crystal report with c#. I try to connect with code as given below

rpt.SetDatabaseLogon(clsDefine.STR_DBUSERID ,clsDefine.STR_PASSWORD,
clsDefine.STR_SERVER,clsDefine.STR_DATABASE);

But If there is different database server It gives an error unable to logon
to the server.

Thanks in advance....
 
Back
Top