cr pointing to another server

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

    #1

    cr pointing to another server

    i have a bunch of reports developed with dev db. reports are called from c#
    windows app and all works fine. now i need to move to production and i can't
    programaticaly repoint to another server. settingTableLog OnInfo objects with
    all the required parameters parameters and passing it to tables is not
    working.
    the only way i can get it to work if i open report repoint db location in
    crystal save it and only than it works. is there a way to avoid this, as i
    said a have a bunch.
    code looks something like this


    crConnectionInf o.ServerName = "server_nam e"
    crConnectionInf o.DatabaseName = "db_name";
    crConnectionInf o.UserID = "account_na me";
    crConnectionInf o.Password = "password";

    crDatabase = myreport.Databa se;
    crTables = crDatabase.Tabl es;
    for (int i = 0; i < crTables.Count; i++)
    {
    crTable = crTables [i];
    crTable.Locatio n=Begin.server;
    crTableLogOnInf o = crTable.LogOnIn fo;
    crTableLogOnInf o.ConnectionInf o = crConnectionInf o;
    crTable.ApplyLo gOnInfo(crTable LogOnInfo);
    }




Working...