<p>I'm working on an existing report and I would like to test it with the database.  The problem is that the catalog set during the initial report creation no longer exists.  I just need to change the catalog parameter to a new database.  The report is using a stored proc for its data.  It looks like if try and remove the proc to re-add it all the fields on the report will disapear and I'll have to start over.</p>

<p>I'm working in the designer in Studio and just need to tweak the catalog property to get a preview.  I have code working to handle things properly from the program.</p>

EDIT: Saw your edit, so i'll keep my original post but have to say.. I've never had a crystal report in design mode in VS so I can't be of much help there sorry.
```
```
report.SetDatabaseLogon(UserID, Password, ServerName, DatabaseName);
```
```
After that you have to roll through all referenced tables in the report and recurse through subreports and reset their logoninfo to one based on the reports connectioninfo.
```
```
private void FixDatabase(ReportDocument report)
    {
        ConnectionInfo crystalConnectionInfo = someConnectionInfo;

        foreach (Table table in report.Database.Tables)
        {
            TableLogOnInfo logOnInfo = table.LogOnInfo;

            if (logOnInfo != null)
            {
                logOnInfo.ConnectionInfo = crystalConnectionInfo;

                table.LogOnInfo.TableName = table.Name;
                table.LogOnInfo.ConnectionInfo.UserID = someConnectionInfo.UserID;
                table.LogOnInfo.ConnectionInfo.Password = someConnectionInfo.Password;
                table.LogOnInfo.ConnectionInfo.DatabaseName = someConnectionInfo.DatabaseName;
                table.LogOnInfo.ConnectionInfo.ServerName = someConnectionInfo.ServerName;
                table.ApplyLogOnInfo(table.LogOnInfo);

                table.Location = someConnectionInfo.DatabaseName + ".dbo." + table.Name;
            }
        }

        //call this method recursively for each subreport
        foreach (ReportObject reportObject in report.ReportDefinition.ReportObjects)
        {
            if (reportObject.Kind == ReportObjectKind.SubreportObject)
            {
                this.FixDatabase(report.OpenSubreport(((SubreportObject)reportObject).SubreportName));
            }
        }
    }
```
```