OWC11 - Can't view Totals in a PivotTable

G

Guille Rugilo

Hi, I'm trying to show some totals in a pivot table, using javascript on the
client-side for filling and displaying the pivot table with a default view.
The problem is that the total is not displayed in the table, instead, a
column named "No Details" appears.
There is a curious detail: if I run the application, and add another field
(say "Time") to the Totals (by adding the field Time to the Data Area), then
both totals, Time and Money, are displayed ok in the table...
Here is my code:

var ptConstants = document.forms[0].pivotTable.Constants;
var totalMoney = activeView.AddTotal("Sum of Money",
activeView.FieldSets("[Money]").Fields(0), ptConstants.plFunctionSum);
activeView.DataAxis.InsertTotal( totalMoney );

totalMoney.DisplayInFieldList = true;
activeView.TotalOrientation = ptConstants.plTotalOrientationColumn;
activeView.DisplayCalculatedMembers = true;
document.forms[0].pivotTable.DisplayFieldList = true;
document.forms[0].pivotTable.AllowDetails = true;
document.forms[0].pivotTable.Refresh();

Thanks.
 

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