C
Chris Magoun
Greetings,
I am using the PivotTable component from OWC10. I am writing client-side
javaScript to enumerate the included/excluded fiels in all of the pivot
table axes. However, I am having trouble accessing the includedMembers
property. Here is a code sample:
//------------Printing Routines------------
function CreateHeaderPageXML() {
//To create the header page XML, we need to enumerate through all of the
//fieldsets on the grid, and list their included members.
var sResult = "";
var axis = new Array();
axis[0] = m_av.rowAxis;
axis[1] = m_av.columnAxis;
axis[2] = m_av.filterAxis;
var axisName = new Array();
axisName[0] = "ROW";
axisName[1] = "COLUMN";
axisName[2] = "FILTER";
//enumerate axes
for(var iAxis = 0; iAxis < axis.length; iAxis++) {
//enumerate fieldset
for(var x = 0; x < axis[iAxis].fieldSets.count; x++) {
var fldSet = axis[iAxis].fieldSets(x);
sResult += fldSet.name + "\n";
//enumerate fields
for(var y = 0; y < fldSet.fields.count; y++) {
var fld = fldSet.fields(y);
sResult += "\t" + fld.name + "\n";
}
//HERE IS THE TROUBLE
if (fld.includedMembers != null) {
var aIncl = new Array();
aIncl = fldIncludedMembers;
for (var z = 0; z < aIncl.length; z ++) {
sResult += "\t\t" + aIncl[z].uniqueName + "\n";
}
}
}
}
alert(sResult);
}
Problem is, length is undefined, so is count. I also tried using a for...in
syntax with no luck. What the heck IS includedMembers?!?! I can write the
loop in VBScript using for...each with no trouble at all, but company
standard is javaScript. Can anyone give me some code samples of where they
accessed included/excludedMembers with javaScript?
Thank you,
Chris Magoun
I am using the PivotTable component from OWC10. I am writing client-side
javaScript to enumerate the included/excluded fiels in all of the pivot
table axes. However, I am having trouble accessing the includedMembers
property. Here is a code sample:
//------------Printing Routines------------
function CreateHeaderPageXML() {
//To create the header page XML, we need to enumerate through all of the
//fieldsets on the grid, and list their included members.
var sResult = "";
var axis = new Array();
axis[0] = m_av.rowAxis;
axis[1] = m_av.columnAxis;
axis[2] = m_av.filterAxis;
var axisName = new Array();
axisName[0] = "ROW";
axisName[1] = "COLUMN";
axisName[2] = "FILTER";
//enumerate axes
for(var iAxis = 0; iAxis < axis.length; iAxis++) {
//enumerate fieldset
for(var x = 0; x < axis[iAxis].fieldSets.count; x++) {
var fldSet = axis[iAxis].fieldSets(x);
sResult += fldSet.name + "\n";
//enumerate fields
for(var y = 0; y < fldSet.fields.count; y++) {
var fld = fldSet.fields(y);
sResult += "\t" + fld.name + "\n";
}
//HERE IS THE TROUBLE
if (fld.includedMembers != null) {
var aIncl = new Array();
aIncl = fldIncludedMembers;
for (var z = 0; z < aIncl.length; z ++) {
sResult += "\t\t" + aIncl[z].uniqueName + "\n";
}
}
}
}
alert(sResult);
}
Problem is, length is undefined, so is count. I also tried using a for...in
syntax with no luck. What the heck IS includedMembers?!?! I can write the
loop in VBScript using for...each with no trouble at all, but company
standard is javaScript. Can anyone give me some code samples of where they
accessed included/excludedMembers with javaScript?
Thank you,
Chris Magoun