OWC 10 How do you set Field Settings / Show Date As

D

Dave Hewes

I am converting excel pivot tables to the web. In excel I can right click and
select Field Settings then Show Date As. Then I select “% of totalâ€. I can
not seem to this on the web.

How do I set “% of total†for "BoxesP"?

My current code (JS) for everything else is as follows:

vwView.TitleBar.Caption = "Available Box Distributionâ€
vwView.FilterAxis.InsertFieldSet(vwView.FieldSets("Size"));
vwView.ColumnAxis.InsertFieldSet(vwView.FieldSets("Status"));
vwView.RowAxis.InsertFieldSet(vwView.FieldSets("Market"));
vwView.RowAxis.InsertFieldSet(vwView.FieldSets("Region"));
vwView.RowAxis.InsertFieldSet(vwView.FieldSets("Branch_Name"));
vwView.DataAxis.InsertFieldSet(vwView.FieldSets("Boxes"));
var totOrderCount;
totOrderCount = vwView.AddTotal("BoxesC",
vwView.FieldSets("Boxes").Fields(0), ptConstants.plFunctionSum);
vwView.DataAxis.InsertTotal(totOrderCount);
totOrderCount = vwView.AddTotal("BoxesP",
vwView.FieldSets("Boxes").Fields(0), ptConstants.plFunctionSum);
vwView.DataAxis.InsertTotal(totOrderCount);
vwView.TotalOrientation = ptConstants.plTotalOrientationRow
vwView.DataAxis.Totals("BoxesP").NumberFormat = "#.##%";
vwView.DataAxis.Totals("BoxesC").Caption = "Boxes";
vwView.DataAxis.Totals("BoxesP").Caption = "% of Total Boxes";
vwView.FieldSets("Market").Fields(0).Expanded = 0;
vwView.ExpandDetails = ptConstants.plExpandNever;



Thanks in advances
Dave
 
D

Dave Hewes

Found it

vwView.DataAxis.Totals("BoxesP").ShowAs =
ptConstants.plShowAsPercentOfColumnTotal;


using XMLData property helped
 

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

Similar Threads


Top