* Loop through each table in the report and set the connection settings * to the proper database. FOR lnCounter = 1 TO loReport.Database.Tables.Count WITH loReport.Database.Tables(lnCounter).ConnectionProperties * Save the current table name lcLocation = loReport.Database.Tables(lnCounter).Location * Clear the current connection properties .DeleteAll() * Set the individual values from the connection string .Add('Provider', lcProvider) .Add('Data Source', lcDataSource) .Add('Initial Catalog', lcInitCatalog) .Add('Password', lcPassword) .Add('User ID', lcUserId) * Reset the table location loReport.Database.Tables(lnCounter).Location = lcLocation ENDWITH ENDFORKurt