BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: Upcoming Events: PGHBOUG: Aug 23.

BO BI 4.2 SP5 Webi - OpenDocument Report download via VBA


 
Search this topic... | Search SDK (VBA/ASP/JSP)... | Search Box
Register or Login to Post    Forum Index -> SDK (VBA/ASP/JSP)  Previous TopicPrint TopicNext Topic
Author Message
Esilance
Forum Member
Forum Member



Joined: 04 Jul 2018

Posts: 2



PostPosted: Wed Jul 04, 2018 5:07 am 
Post subject: BO BI 4.2 SP5 Webi - OpenDocument Report download via VBA

Hello,

I would like to know if there is a way to download a BO Webi Report (OpenDocument) via VBA with Office Access or Excel.

Right now I can Login to BO Webi and open the desired Webi OpenDocument Report with the following VBA Code:

Image link

Code:
    Private Sub btnReportBO_Click()
        WebBrowser.navigate "https://xxxxxx.com/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=FjkfNFtyyg4ABJEBAABnyuNvAFBWgRcs"
    End Sub
   
    Private Sub WebBrowser_DocumentComplete(ByVal pDisp As Object, url As Variant)
    With WebBrowser
        If .Document.title = "OpenDocument" Then
            .Document.all("_id0:logon:USERNAME").Value = strUsername
            .Document.all("_id0:logon:PASSWORD").Value = strPassword
            Do: Loop Until .Document.ReadyState = "complete"
            .Document.all("_id0:logon:logonButton").Click
        End If
    End With
    End Sub


After that how can download the table?
I fail because I don't know how to access the Frame or iFrame containing the table. If I download the HTML source code via right click - View Source to my Desktop then I can Export the table to Access with the following Code:

Image link

Code:
    With WebBrowser
        If .Document.title = "" Then
            Dim x As Long
            Dim RS As DAO.Recordset
            Set RS = CurrentDb.OpenRecordset("tbl_ReportBO")
            If .Document.getElementsByTagName("table")(0).Rows(0).Cells(0).innerText = "Route" Then
                With .Document.getElementsByTagName("table")(0)
                    For x = 1 To .Document.getElementsByTagName("TABLE")(0).Rows.Length - 1
                        RS.AddNew
                            RS("Route") = .Rows(x).Cells(0).innerText
                        RS.Update
                    Next x
                End With
            End If
        End If
    End With


How can I Access the Report/Table in the Document Frame via VBA?
Or How can I download the entire source code to an text file?


Best regards
Back to top
Esilance
Forum Member
Forum Member



Joined: 04 Jul 2018

Posts: 2



PostPosted: Fri Jul 13, 2018 5:13 pm 
Post subject: Re: BO BI 4.2 SP5 Webi - OpenDocument Report download via VB

Finally made it with Microsoft HTML Object Library. Now I’m able to open the Webi OpenDocument Report and to Import the table into Office Access via VBA.
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> SDK (VBA/ASP/JSP)  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0308 seconds using 17 queries. (SQL 0.0026 Parse 0.0009 Other 0.0274)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo