Saving pivottable OWC views?

C

Claude Vernier

The key feature is the XMLData member of the pivot table,
for example, you can add a button:

<input id="btnDisplayXML" onclick="javascript:popupXMLData
();" type="button" value="View XML">

and the function:

function PopupXMLData()
{
if( document.getElementById("OWCPivotTable") )
{
var oPopup = window.createPopup();
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerText =
document.frmDisplayOWC.OWCPivotTable.XMLData;

var iScreenWidth = screen.availWidth;
var iScreenHeight = screen.availHeight;

var iFrmWidth = iScreenWidth * 0.75;
var iFrmHeight = iScreenHeight * 0.75;

oPopup.show( (iScreenWidth-iFrmWidth)/2,
(iScreenHeight-iFrmHeight)/2, iFrmWidth, iFrmHeight);
}
}


There is plenty of ways to use this XMLData, you can save
it in a hidden tag and post it to the server or store it
locally on the computer so the user can load it later on.

Personnaly, I save the XML on the server and the user can
select which view he wants and I only need to load the
pivot table with the content of the file.

You can also get an XML Schema from the file and create
it as a class, using C# serialization you can build your
view...

Good luck and merry christmas,
Claude
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top