0

I am using sbisdk-all-production.js to integrate SpagoBI cockpit in external web-app.
Following is the code snippet I am using to load cockpit in web-app:

var url = Sbi.sdk.api.getDocumentUrl({  
            documentLabel: 'cockpit__xxxxxx'  
            // The document label.  
            , executionRole: '/spagobi/user'  
            , parameters: {par_clientId : 3}  
            , displayToolbar: false  
            , displaySliders: false  
            , height: '600px'  
            , width: '100%'  
            , iframe: {  
                style: 'border: 0px;'  
            }  
        });
document.getElementById('spagoCockpitIframe').src = url;

Cockpit is getting displayed.
But when parameters are passed through JavaScript api Sbi.sdk.api.getDocumentUrl then parameters are getting ignored.
I am stuck over this issue since 3 days. Can anyone give some pointers?

Chaitanya
  • 331
  • 2
  • 17

1 Answers1

0

You can try to write the following

parameters: {'PARAMETERS': 'par_clientId=3'}

Example

var url = Sbi.sdk.api.getDocumentUrl({  
  documentLabel: 'cockpit__xxxxxx', 
  executionRole: '/spagobi/user', 
  parameters: {'PARAMETERS': 'par_clientId=3'},
  displayToolbar: false,  
  displaySliders: false, 
  height: '600px',
  width: '100%',
  iframe: {
    style: 'border: 0px;'  
  }  
});

document.getElementById('spagoCockpitIframe').src = url;
Mario Tacke
  • 5,378
  • 3
  • 30
  • 49
MMAARR
  • 93
  • 4