Greetings to all.
I have a problem with the following Web Pivot Table function causing a "Subscript Out of Range Error". I have narrowed the issue down to what appears to be the "$" character used in the following statement from the code below: " v.DataAxis.InsertFieldSet(
v.FieldSet
s("COS$I01
")); "
Any help would be greatly appreciated.
Thank you in advance,
Keith
Full code of function
function rptCorrections()
{
<!-- Declarations -->
var v = pivot.ActiveView;
var c = pivot.Constants;
<!-- Set Connection to Database -->
pivot.ConnectionString = "Provider=MSPersist.1";
pivot.CommandText = "../DataConn/GetXMLData_Co
rrections.
asp";
pivot.DisplayFieldList = false;
<!-- Choose Fields for Initial View -->
v.RowAxis.InsertFieldSet(v
.FieldSets
("WHSE"));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("COLCI01
"));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("AVGCOR"
));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("DRLCI01
"));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("AVGDRO"
));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("TOTLNE0
1"));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("AVGLIN"
));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("PCNTCOR
"));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("COS$I01
"));
v.DataAxis.InsertFieldSet(
v.FieldSet
s("CCORPER
"));
<!-- Set the field captions -->
v.Fieldsets("WHSE").Fields
("WHSE").C
aption="Wa
rehouse"
v.Fieldsets("COLCI01").Fie
lds("COLCI
01").Capti
on="Correc
tions Total"
v.Fieldsets("AVGCOR").Fiel
ds("AVGCOR
").Caption
="Correcti
ons Average"
v.Fieldsets("DRLCI01").Fie
lds("DRLCI
01").Capti
on="D R O S Total"
v.Fieldsets("AVGDRO").Fiel
ds("AVGDRO
").Caption
="D R O S Average"
v.Fieldsets("TOTLNE01").Fi
elds("TOTL
NE01").Cap
tion="Tota
l Lines"
v.Fieldsets("AVGLIN").Fiel
ds("AVGLIN
").Caption
="Average Lines"
v.Fieldsets("PCNTCOR").Fie
lds("PCNTC
OR").Capti
on="Percen
t of Corrections Per Line"
v.Fieldsets("COS$I01").Fie
lds("COS$I
01").Capti
on="Cost of Correctioins"
v.Fieldsets("CCORPER").Fie
lds("CCORP
ER").Capti
on="Cost of Corrections Per Line"
}