crystal report logon server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Das

    crystal report logon server

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

    For Each tbl In Report.Database .Tables
    tbl.SetLogOnInf o 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.SetDatabase Logon(clsDefine .STR_DBUSERID ,clsDefine.STR_ PASSWORD,
    clsDefine.STR_S ERVER,clsDefine .STR_DATABASE);

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

    Thanks in advance....



Working...