Reputation: 406
If we have a simple .dxp file created in tibco and we want to display this on a webpage then how we can do this? Is it possible if anyone can provide a sample project to do this? The application has to be in MVC.
Thanks in advance
Upvotes: 0
Views: 560
Reputation: 41
Not sure about .Net MVC as I have not tested with MVC in particular. To open a spotfire report in plain html page use the following code and set the error events to identify errors.
<div id="AppDiv" style="height:1000px;">
</div>
<script type="text/javascript" src="http://yourserver/spotfire/wp/GetJavaScriptApi.ashx?Version=7.5"></script>
<script>
window.onload = function () {
var customisation = new spotfire.webPlayer.Customization();
customisation.showTopHeader = true;
customisation.showToolBar = true;
customisation.showExportFile = true;
customisation.showExportVisualization = true;
customisation.showCustomizableHeader = true;
customisation.showPageNavigation = true;
customisation.showStatusBar = true;
customisation.showDodPanel = true;
customisation.showFilterPanel = true;
// create a web player variable which is needed to actually open and load your spotfire project into a web page
var webPlayer = new spotfire.webPlayer.Application("https://myserver/spotfire/wp", customisation); // point it to the spotfire web player library and supply the customisation to it
// now load the web player into your web page
webPlayer.open(
'/path/Analysis/xyz', // the path to your project in the Spotfire library
'AppDiv', // this is the div tag in your HTML page you want to the web player to appear inside
null // this last option is for if you need to pass your web player parameters for a parameterised information link
);
webPlayer.onError(errorCallback); //Register an error handler to catch errors
webPlayer.onOpened(onOpenedCallback); //Register event handler for document opened event
webPlayer.onClosed(onDocumentClosedCallback); //Register event handler for document closed event
function errorCallback(errorCode, description) { alert(errorCode + ": " + description); } //Displays an error message
function onOpenedCallback(analysisDocument) { } //Document is now opened and ready for interactions
function onDocumentClosedCallback(analysisPath) { } //Document is now closed
}
Reference: http://www.bearonspotfire.com/how-to-embed-the-spotfire-web-player-inside-a-web-page
You can also look at this video for proper answers on implementation. https://www.youtube.com/watch?v=wm863bw3XCw
Upvotes: 0
Reputation: 633
On the Tibco website you will find exampe showing how to embedd Tibco Spotfire Webplayer into the HTML page. There are also infomation how to handle communication between Tibco Spotfire Webplayer and your HTML page.
The example is here: http://stn.spotfire.com/stn/Tasks/IntegratingWithWebPlayer.aspx http://stn.spotfire.com/stn/Tutorials/HowToControlWebPlayer.aspx
This is official Tibco site but you will find other using Googling. :)
Upvotes: 1