crystal report logon server

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top