Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Smart View VBA Connect to EssCS Issue

Question
12
Views
0
Comments

Summary

Smart View VBA Connect to EssCS Issue

Content

Hello All,

I've created a workbook that utilizes Smart View VBA to connect to, submit data to, calculate data in, and retrieve data from an EssCS cube. I set up the connection like I have in the past with OP Essbase, but even though I've sent in the username and password via HypConnect (and the connection is successful), I still get prompted to login again using the typical SV EssCS login screen. Is this a bug or how do I get around it? When I use the same code to connect to an OP cube, it works fine.

    EssUsername = frmLogin.txtUsername.Value

    EssPassword = frmLogin.txtPassword.Value

    CommonName = "Essbase_OPM"

    CommonNameCloud = "EssbaseCloud_OPM"

    CloudIPAddress = "http://" & Sheet1.Range("O4").Value & ":9000/essbase/smartview"

    OPAddress = "http://" & Sheet1.Range("O3").Value & ":9001/aps/SmartView"

   

    X = HypDisconnectAll()

   

    If Sheet1.cboConnection.Value = "On-Premises" Then

        X = HypConnect(Empty, EssUsername, EssPassword, CommonName)

        If X <> 0 Then

            bX = HypConnectionExists(CommonName)

            If bX = False Then

                Y = HypCreateConnection(Empty, EssUsername, EssPassword, HYP_ESSBASE, OPAddress, Sheet1.Range("O3").Value, "USG_WF", "Emp_Dets", CommonName, CommonName)

                If Y <> 0 Then

                    SVError = SmartViewEC(Y)

                    Exit Sub

                End If

            End If

            SVError = SmartViewEC(X)

        Else

            Call RetrieveAll

            frmLogin.Hide

            With Sheet1

                .Shapes("grpScenario").Visible = True

                .radActual.Visible = True

                .radActualvBudget.Visible = True

                .radBudget.Visible = True

                .radForecast.Visible = True

                .cmdLogin.Enabled = False

            End With

        End If

    ElseIf Sheet1.cboConnection.Value = "Cloud" Then

        X = HypConnect(Empty, EssUsername, EssPassword, CommonNameCloud)

        If X <> 0 Then

            bX = HypConnectionExists(CommonNameCloud)

            If bX = False Then

                Y = HypCreateConnection(Empty, EssUsername, EssPassword, HYP_ESSBASE, CloudIPAddress, Sheet1.Range("O4").Value, "USG_WF", "Emp_Dets", CommonNameCloud, CommonNameCloud)

                If Y <> 0 Then

                    SVError = SmartViewEC(Y)

                    Exit Sub

                End If

            End If

            SVError = SmartViewEC(X)

        Else

            Call RetrieveAll

            frmLogin.Hide

            With Sheet1

                .Shapes("grpScenario").Visible = True

                .radActual.Visible = True

                .radActualvBudget.Visible = True

                .radBudget.Visible = True

                .radForecast.Visible = True

                .cmdLogin.Enabled = False

            End With

        End If

    End If