Connection object, MetaDataConnection object, Documents collection
Documents—Opens an existing Interactive Reporting document file (BQY).
Connection—Opens an existing Interactive Reporting database connection file (OCE).
The Documents.Open() object model syntax is not supported in an Interactive Reporting document file to be deployed in EPM Workspace. |
Expression.Open(Filename As String)
An expression that returns a Connection, or Documents object
This example shows how to open an existing Interactive Reporting document file:
var MyFile = "C:\\BQDocs\\JavaTest.bqy" var MyDoc = Documents.Open(MyFile) Alert(MyDoc.Name + " is open")
This example shows how to open an existing Interactive Reporting file (.oce):
var MyOCE = "C:\\BQDocs\\SQL.oce" ActiveDocument.Sections["Query"].DataModel.Connection.Open(MyOCE) ActiveDocument.Sections["Query"].DataModel.Connection.Username = "qa" ActiveDocument.Sections["Query"].DataModel.Connection.SetPassword("qa") ActiveDocument.Sections["Query"].DataModel.Connection.Connect() or var MyOCE = "C:\\BQDocs\\SQL.oce" var MyCon = ActiveDocument.Sections["Query"].DataModel.Connection MyCon.Open(MyOCE) MyCon.Username = "qa" MyCon.SetPassword("qa") MyCon.Connect()