privatevoid button1_Click(object sender, System.EventArgs e)<?xml:namespace prefix <bold>o ns</bold> "urn:schemas-microsoft-com:office:office" /??> { if (m_report != null) // fermeture de l'état en cours m_report.Close(); m_report = new ReportDocument(); m_report.Load (textBox1.Text); if (!m_report.IsLoaded) return; // change the database connection information // Set the logon information for each table. foreach(Table table in m_report.Database.Tables) { TableLogOnInfo logonInfo = new TableLogOnInfo(); // Get the TableLogOnInfo object. logonInfo = table.LogOnInfo; // Set the server or ODBC data source name, // user ID, and password. logonInfo.ConnectionInfo.ServerName = "(local)"; logonInfo.ConnectionInfo.UserID = "user1"; logonInfo.ConnectionInfo.Password = "password"; // Apply the connection information to the table. table.ApplyLogOnInfo(logonInfo); if (!table.TestConnectivity()) table.LogOnInfo.ConnectionInfo.Password="password"; } Report report = new Report(m_report); report.ShowDialog(); } C# is amazing, enjoy it!