Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Business Objects and Excel and VBA

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    232
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Again

    I need to create the code that will export a Business Objects report to a .pdf or .xls then email it to the client.

    The code is done in BO script called "Report sript" but is similar to VBA.

    I know this is a bit out of scope of the site, but if anyone has experience doing this it would be greatly appreciated.
    Matt

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    232
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry to bring this one back... any idea?

  3. #3
    Board Regular
    Join Date
    Dec 2003
    Location
    Lincoln
    Posts
    243
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Bump!

    sorry to bump such an old post but i too would like to do this.....

    Any ideas?

    ta

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You are going to have to educate us a bit in order to recieve some help. Is this "Report sript" something that is available to VBA via COM? Does it need to be translated into VBA?

  5. #5
    Board Regular
    Join Date
    Dec 2003
    Location
    Lincoln
    Posts
    243
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ok sorry, this is the code: - problem occurs in the penultimate line (I have discoverd that i am running BO 5.1.8 which cannot export to excel!, but should export to a text file which i can then open in excel)

    any ideas why this will not work? - error is Runtine error 424 object required

    thanks

    Dim BOApp As busobj.Application
    Dim Doc As busobj.Document
    Dim DataProv As busobj.DataProvider

    Set BOApp = New busobj.Application
    BOApp.Visible = False

    Call BOApp.LoginAs

    Set Doc = BOApp.Documents.Open(strPath & "\NSIRauditdataset.rep")
    Doc.Refresh
    Document.Reports(1).ExportAsText (strPath & "\NSIRauditdataset.txt")
    Doc.Save

  6. #6
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    73,950
    Post Thanks / Like
    Mentioned
    25 Post(s)
    Tagged
    2 Thread(s)

    Default

    Shouldn't you have a reference to BOApp somewhere there?

    Perhaps something like this?
    Code:
    BOApp.Reports(1).ExportAsText (strPath & "\NSIRauditdataset.txt")
    Or this?
    Code:
    Doc.Reports(1).ExportAsText (strPath & "\NSIRauditdataset.txt")
    If posting code please use code tags.

  7. #7
    Board Regular
    Join Date
    Dec 2003
    Location
    Lincoln
    Posts
    243
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thnak Norrie, the second line was just what i needed! ta

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •