Forum Stats

  • 3,769,410 Users
  • 2,252,962 Discussions
  • 7,875,023 Comments

Discussions

Download excel??

738277
738277 Member Posts: 330
Hi Experts,

I have a report with filters on District Number, Calendar Year, Calendar Month, Brand Name each filter is given a Presentation Variable. This report is placed on a Dashboard. Now I need to place a link on this dashboard which directly downloads the excel file. I can't use the report 'Download' Link...........I know Go url but it only downloads the report with default values not the values in the dashboard prompt. I need to pass the presentation values to the target report.......and it has to directly ask for saving the excel file.........Is there any way to achieve this?

Thanks,
DK

Answers

  • Kranthi.K
    Kranthi.K Member Posts: 1,586
    Hi,

    That cant be directly achieved,why cant you try the BI publisher instead so the values are passed.
    Here is the nice blog http://kirti-bi-solutions.blogspot.com/2009/06/passing-parameters-from-obiee.html

    Hope it helps you.

    By,
    KK
  • setme31
    setme31 Member Posts: 4
    edited Jan 13, 2011 2:49PM
    This can be accomplished through the GO URL. If you change the action of the GO button (JavaScript) on the dashboard prompt, you can write the prompt values into a variable and then you can pass these variables to the GO URL. You don't need to use session variables in your report. You can set each of the filters to "is prompted". I don't know what the limit is for multi-selects, but I have tested a prompt with 8 values in one multi-select, and it worked fine.

    Below are some snipets from the code that are helpful. Do a Google search for Global Go button to learn more about changing the action of the GO button.

    Example:

    var aInput = aSpanElm[a].getElementsByTagName('input'); // multi-select and text boxes
    var aOption = aSpanElm[a].getElementsByTagName('option'); // dropdown


    //Check if Customer Number has value(s)
    if(sCaption=='Customer Number'){
    for(var c=0; c<aInput.length; c++){

    if(aInput[c].value.trim().length > 0){
    var CustomerNumSelected = aInput[c].value;
    }
    else
    {
    CustomerNumSelected = '""'
    }
    }
    } //Endif check Customer Number field

    Then you need to remove all reserved characters from your variable.
    //Convert function
    function convert(str) {
    str = str.replace(/'/g,'"').replace(/\s/g,'%20').replace(/\$/g,'%24').replace(/\&/g,'%26').replace(/\+/g,'%2B').replace(/,/g,'%2C').replace(/\//g,'%2F').replace(/\:/g,'%3A').replace(/\;/g,'%3B').replace(/\=/g,'%3D').replace(/\?/g,'%3F').replace(/\@/g,'%40');
    return str;
    }

    CustomerNumSelected=convert(CustomerNumSelected)

    *Then you need to set up your filters in the URL*
    var CustNumURL = '&col1="-%20Customer%20Identification"."Customer%20Number"&val1=' + CustomerNumSelected

    *Finally, build and execute your URL*
    var myURL = 'http://xxx/analytics/saw.dll?Go&path=/Shared/Data%20Reports/Invoice%20Data%20Download&Action=Navigate&Format=csv&Extension=.csv' + CustNumURL

    winRef=window.open(myURL);

    *Done*

    When you click the GO button, a new window will open up. When the report finishes running, it will prompt you to Open or Save the report. No results are brought back to the dashboard or the new pop-up window.

    Edited by: user3688785 on Jan 13, 2011 11:48 AM
  • 969617
    969617 Member Posts: 28

    Hi 831052,

    Which version of OBIEE did you use this code in?

This discussion has been closed.