Calculated field,dataField error "Subscript Out of range"

P

praveen

Hii,
I m using Pivot table(OWC) in asp.net(C#) application,sql server 2000 as
database ,and I am doing connection,assignment of data fileds to Pivot table
in html code through vb script.But some othe fields,addCalculatedTotal fields
are giving error "Subscript Out of range".
Sample code are here..Plz point me a solution

Set c = document.all.PTable.Constants
Set stdProcessSum = PView.AddTotal("StandardProcess",
PView.FieldSets("<%=Criteria2%>").Fields(0), c.plFunctionSum)
PView.DataAxis.InsertTotal(stdProcessSum)
Set stdProcessCount = PView.AddTotal("StdProcesOutOf",
PView.FieldSets("<%=Criteria2%>").Fields(0), c.plFunctionCount)
PView.DataAxis.InsertTotal(stdProcessCount)

Set pTotal =PView.Totals("PriceAverage")
PView.AddCalculatedTotal "PriceAverage","Price Average","[stdProcessSum]*100
/ [stdProcessCount]"
PView.DataAxis.InsertTotal(pTotal)
 

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