OBIEE 11g – Export To The File System

Posted on August 22, 2011 by Paul McGarrick
Filed Under Action Framework, Dashboards, Delivers, Export, OBIEE 11g, Reports

Here’s a nice script I wrote to enable the exporting of content from OBIEE to the Windows file system. Useful if you don’t have enough licences for everyone to consume reports/dashboards within the OBIEE application or if you want to build an archive over time.

The principle is quite simple, an Agent is set up in Oracle Delivers and the Delivery Content specified as normal. In this case a whole dashboard page is going to be exported as a PDF.

On the Actions tab we add a new action to Invoke a Server Script.

Click the Edit Parameters (pencil) icon to change the properties. Set the language to VBScript and set the Script Path to be wherever the export script (downloaded from the bottom of this post) has been saved on the OBIEE server.

Finally we must specify 3 parameters for the export script to use: the file to be exported, the desired file and folder names. See the screenshot:

Now each time the Agent is executed it will create a subdirectory (with yyyy-mm-dd format) and within that directory the file will be saved.

Here you can download the VBScript that does the hard work. Neat eh?

Comments

17 Responses to “OBIEE 11g – Export To The File System”

  1. Rajeev Saxena on February 4th, 2012 6:22 pm

    Paul,
    Just to confirm this solution will only work if BI server is installed on windows machine, correct?
    Can you provid the equivalent javascript so that this solution can work on UNIX/LINUX machines also?

    Thanks,
    RS

  2. Paul McGarrick on February 8th, 2012 11:48 pm

    Sorry, only supported on Windows

  3. raj on March 29th, 2012 10:51 pm

    Hi I tried the same method but I am getting error as ” nQSError: 66013] [Line:31 Column:2] Path not found ” when I run the agent. I did not modify anything in the vb script file.

    Can you help me why I am getting this error.


    thanks
    raj
    vrsh55@gmail.com

  4. Saurabh Jaiswal on April 13th, 2013 12:08 pm

    Thanks for the good script Paul.

    @Raj – You’ve to modify the script, create the folders and provide the path i.e.

    sBasePath = “C:\reports\reports”

  5. Joe on May 22nd, 2013 7:07 pm

    Hello..I’m having an issue with a script very similar. I had a windows file server where I was executing a script similar to this successfully. I have since changed to a new windows file server and now my agent is failing with following error.

    [nQSError: 66013] [Line:75 Column 1]
    Permission Denied

    I am guessing this is an issue with the saving to the file system and perhaps some permissions.

    This is the syntax of Line 75 column 1

    objFSO.CopyFile Parameter(0), sFileName, True

    I can provide the whole script if needed. But my real question is what user (windows user i’m guessing) is the agent using to execute this command? This way I can review the users and make sure they have permission to this new server. Does that make sense? Can you please help?

  6. Rich on August 29th, 2013 3:56 pm

    Hello sir,
    How can we accomplish this on linux server as in the early comment you specified that the above process cannot be done on a linux server.But is there any other way.
    Thanks in advance.

  7. Leonard on December 3rd, 2013 10:26 pm

    I too would love a Unix solution to this. I am currently investigating the possibility, Seems like an omission in OBIEE – the ability to direct the Analysis file to a specified location (in our case for further processing/integration into a reporting system.)

    any pointer would be welcome.

  8. Adi on February 13th, 2014 2:59 pm

    Thank you Mr. Paul McGarrick.
    This solution woks very well on Windows !

  9. Ashish Gandhi on July 9th, 2014 4:25 pm

    Invoke a Java Method – Need to deploy EJB – I am currently working on it and should share details when I complete working on it

  10. Jeroen on August 6th, 2014 1:46 pm

    I tried this with an Excel output, but that won’t work. The Excel file shows a lot of text and later some data.

    Is there a solution for this?

  11. Jeroen on August 6th, 2014 1:47 pm

    Perfect script, but i tried this with Excel and that doesn’t work well. The output isn’t like the report.

    Is there a solution for that?

  12. Federico on October 6th, 2014 3:34 pm

    Hi, I wasn’t able to download the script… I get the following message:

    403
    Forbidden
    Access to this resource on the server is denied

    The file is still there?
    Thanks in advance!

  13. Paul McGarrick on October 7th, 2014 4:43 pm

    It seems our web host has changed some configuration on the server side and restricted the download of .vbs files. I’ve renamed the file with a .txt extension and you can download it again now, just remember to remove the .txt extension before use.

  14. Kani on October 17th, 2014 5:00 am

    Hi,

    I have saved the below script for saving the report in network drive. But i get the error
    [nQSError: 61005] File error: path=D:reports\export_report.vbs, code=3: The specified path was invalid.

    I saved the file in OBIEE server D:\reports\export_report.vbs and also created one more folder D:\reports\reports

    Please help me and let me know if I miss any step

    Dim sBasePath
    sBasePath = “D:\reports\reports”

    Dim sMasterPath
    sMasterPath = sBasePath & “\” & folder_name

    Dim objFSO
    Set objFSO = CreateObject(“Scripting.FileSystemObject”)

    ‘check whether master directory exists, if not create
    Dim objMasterDir
    If Not objFSO.FolderExists(sMasterPath) Then
    Set objMasterDir = objFSO.CreateFolder(sMasterPath)
    End If
    Set objMasterDir = Nothing

    ‘build string to get date in yyyy-mm-dd format
    Dim sDate, sDateFull
    sDate = Now
    sDateFull = DatePart(“yyyy”, sDate) & “-”
    If Len(DatePart(“m”, sDate))=1 Then sDateFull = sDateFull & “0” End If
    sDateFull = sDateFull & DatePart(“m”, sDate) & “-”
    If Len(DatePart(“d”, sDate))=1 Then sDateFull = sDateFull & “0” End If
    sDateFull = sDateFull & DatePart(“d”, sDate)

    Dim sDir
    sDir = sMasterPath & “\” & sDateFull

    Dim objDir
    If Not objFSO.FolderExists(sDir) Then
    Set objDir = objFSO.CreateFolder(sDir)
    End If
    Set objDir = Nothing

    Dim sFileName
    sFileName = sDir & “\” & test_report

    Dim objFile
    objFSO.CopyFile test_report, sFileName, True

    Set objFile = Nothing

    Set objFSO = Nothing

  15. Paul McGarrick on October 17th, 2014 9:36 am

    Perhaps you have a missing backslash in the path to the vbscript file?

    D:reports\export_report.vbs
    should be
    D:\reports\export_report.vbs

    Paul

  16. Kani on October 20th, 2014 3:47 am

    Hi,
    Thanks a lot, yes I corrected that now. still I get the error
    [nQSError: 66013] [Line:57 Column:1]
    Invalid procedure call or argument

    The Line 57 is objFSO.CopyFile test_report, sFileName, True
    Please check the code and let me know if I miss any

  17. Stewart Bryson on September 25th, 2015 1:44 pm

    Just to weigh in on the licensing comment… OBIEE licenses are technically required even to view content exported from the tool. Just this doesn’t eliminate the need for licenses.

Leave a Reply




Please fill in this CAPTCHA to prove you\'re a human: Time limit is exhausted. Please reload CAPTCHA.