I use RAS vb.net to modify the connection type switch the to ODBC and point to the database location which is never the same.
boInnerPropertyBag.Add("Connection String", "Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=" + DataLocation + ";")
boInnerPropertyBag.Add("Trusted_Connection", "0")
boInnerPropertyBag.Add("UseDSNProperties", "False")
'----------------------------------------------------
'Set the attributes for the boMainPropertyBag
boMainPropertyBag.Add("Database DLL", "crdb_odbc.dll")
boMainPropertyBag.Add("QE_DatabaseName", "")
boMainPropertyBag.Add("QE_DatabaseType", "ODBC (RDO)") '----------------------------------------------------
'Add the QE_LogonProperties we set in the boInnerPropertyBag Object
boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag)
boMainPropertyBag.Add("QE_ServerDescription", "Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=" + DataLocation + ";")
boMainPropertyBag.Add("QE_SQLDB", "True")
boMainPropertyBag.Add("SSO Enabled", "False")
But the command we use to change paperOrientation is not RAS
objReport.PrintOptions.PaperOrientation = PaperOrientation.Portrait
CRViewer.RefreshReport()