Fieldset 'xxx' has no included fields

T

Tony

I am trying to programmatically control the OWC pivot table. I have fields
selected in listboxes that are added to the proper axis (row, column, data,
filter) when a button is selected.

When my page first displays, the OWC control is empty & when the button is
selected everything works just fine.

However, if I remove a field from the row or column axis and select the
button again (everything else remaining the same), I get the following
error...

"The query could not be processed:
The fieldset 'xxxxx' has no included fields. At least one must be
included."

Questions:
1) Could someone please explain what this message means
2) The field that I've selected is now bold in the field list which
indicates to me that it did get added to the pivot table

Here is the javascript used to add the field:

addFields(window.document.forms[0].lb_columns, Pivot.ActiveView.ColumnAxis);

function addFields(selectedRow, selectedAxis) {
for (i = 0; i < selectedRow.children.length; i++) {
fieldName = selectedRow.children.innerText;
selectedAxis.InsertFieldSet(Pivot.ActiveView.Fieldsets(fieldName));
}
}

Again, works first time, just not subsequent calls.

Thanks
 
A

Alvin Bruney [MVP]

This one is difficult, i'd suggest that you write some code to display the
MDX query being generated. Once you have the MDX query, analyse it to see if
it is malformed. You'd need MDX knowledge to go that route.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
T

Tony

Thanks for the reply Alvin...

I got around this in a way that seems wrong - but it works!!!

I loop thru all the fields for the fieldset that I want to add and set the
isIncluded property to true.

Tony

Alvin Bruney said:
This one is difficult, i'd suggest that you write some code to display the
MDX query being generated. Once you have the MDX query, analyse it to see if
it is malformed. You'd need MDX knowledge to go that route.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tony said:
I am trying to programmatically control the OWC pivot table. I have fields
selected in listboxes that are added to the proper axis (row, column,
data,
filter) when a button is selected.

When my page first displays, the OWC control is empty & when the button is
selected everything works just fine.

However, if I remove a field from the row or column axis and select the
button again (everything else remaining the same), I get the following
error...

"The query could not be processed:
The fieldset 'xxxxx' has no included fields. At least one must be
included."

Questions:
1) Could someone please explain what this message means
2) The field that I've selected is now bold in the field list which
indicates to me that it did get added to the pivot table

Here is the javascript used to add the field:

addFields(window.document.forms[0].lb_columns,
Pivot.ActiveView.ColumnAxis);

function addFields(selectedRow, selectedAxis) {
for (i = 0; i < selectedRow.children.length; i++) {
fieldName = selectedRow.children.innerText;
selectedAxis.InsertFieldSet(Pivot.ActiveView.Fieldsets(fieldName));
}
}

Again, works first time, just not subsequent calls.

Thanks

 
A

Alvin Bruney [MVP]

If it works, it works right?

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tony said:
Thanks for the reply Alvin...

I got around this in a way that seems wrong - but it works!!!

I loop thru all the fields for the fieldset that I want to add and set the
isIncluded property to true.

Tony

Alvin Bruney said:
This one is difficult, i'd suggest that you write some code to display
the
MDX query being generated. Once you have the MDX query, analyse it to see
if
it is malformed. You'd need MDX knowledge to go that route.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tony said:
I am trying to programmatically control the OWC pivot table. I have
fields
selected in listboxes that are added to the proper axis (row, column,
data,
filter) when a button is selected.

When my page first displays, the OWC control is empty & when the button
is
selected everything works just fine.

However, if I remove a field from the row or column axis and select the
button again (everything else remaining the same), I get the following
error...

"The query could not be processed:
The fieldset 'xxxxx' has no included fields. At least one must be
included."

Questions:
1) Could someone please explain what this message means
2) The field that I've selected is now bold in the field list which
indicates to me that it did get added to the pivot table

Here is the javascript used to add the field:

addFields(window.document.forms[0].lb_columns,
Pivot.ActiveView.ColumnAxis);

function addFields(selectedRow, selectedAxis) {
for (i = 0; i < selectedRow.children.length; i++) {
fieldName = selectedRow.children.innerText;
selectedAxis.InsertFieldSet(Pivot.ActiveView.Fieldsets(fieldName));
}
}

Again, works first time, just not subsequent calls.

Thanks

 

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