A
Andrew Ofthesong
Hi.. i've read lot of articles on sorting OWC 10 pivot tables....
But when trying, i get an error:
"The object don't accept the poperty or method:
'oView.Fieldsets(...).Fields(...).SortOn'"
But strangelly, i've done an equivalent example in VBasic wth OWC and the
property does exists...
My table is:
oView.RowAxis.InsertFieldSet oView.Fieldsets("Mes")
oView.RowAxis.InsertFieldSet oView.Fieldsets("Agent")
oView.DataAxis.InsertTotal oView.AddTotal("SumSells",
oView.Fieldsets("Sells").Fields(0), Pivot.Constants.plFunctionSum)
oView.Totals("SumSells").NumberFormat = "#,##0"
and i just want to show the table ordered from best seller to worse...
I'm trying:
oView.FieldSets("Agent").Fields(0).SortDirection =
plSortDirectionDescending
oView.FieldSets("Agent").Fields(0).SortOn = oView.Totals("SumSells")
And also trying a lot of other stuff but gan't get it...
I've checked articles:
http://www.microsoft.com/mspress/books/sampchap/3533d.asp
http://msdn.microsoft.com/library/en-us/dnacbk02/html/odc_4010c12.asp
among others... but don't understadn why still can't sort...
But when trying, i get an error:
"The object don't accept the poperty or method:
'oView.Fieldsets(...).Fields(...).SortOn'"
But strangelly, i've done an equivalent example in VBasic wth OWC and the
property does exists...
My table is:
oView.RowAxis.InsertFieldSet oView.Fieldsets("Mes")
oView.RowAxis.InsertFieldSet oView.Fieldsets("Agent")
oView.DataAxis.InsertTotal oView.AddTotal("SumSells",
oView.Fieldsets("Sells").Fields(0), Pivot.Constants.plFunctionSum)
oView.Totals("SumSells").NumberFormat = "#,##0"
and i just want to show the table ordered from best seller to worse...
I'm trying:
oView.FieldSets("Agent").Fields(0).SortDirection =
plSortDirectionDescending
oView.FieldSets("Agent").Fields(0).SortOn = oView.Totals("SumSells")
And also trying a lot of other stuff but gan't get it...
I've checked articles:
http://www.microsoft.com/mspress/books/sampchap/3533d.asp
http://msdn.microsoft.com/library/en-us/dnacbk02/html/odc_4010c12.asp
among others... but don't understadn why still can't sort...