Error on sorting

  • Thread starter Andrew Ofthesong
  • Start date
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...
 
A

Andrew Ofthesong

yes dan.. it's on a web page....

I'm actually using OWC 10 (with correct clsid)...
 
A

Andrew Ofthesong

Ok, I found the way to do it:

Dim Ser
Set Ser = CSpace.Charts(0).SeriesCollection("Sales")
Ser.Select
CSpace.Commands(c.chCommandSortDescending).Execute
 

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