Bug Report T334565
Visible to All Users

Server Mode - An exception is raised on opening the prefilter if the Unbound Field with Aggregated data is shown in the filter area

created 9 years ago

[DevExpress Support Team: CLONED FROM T319091: OutOfMemoryException is thrown in prefilter if a field provides many unique values]
Hello,
In the empty grid, opening a prefilter is causing the error.
Working draft has been updated through the Upgrade Project.
No changes have been made more.
Error:
Value cannot be null.
Parameter name: source
StackTrace:
 at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
  at DevExpress.PivotGrid.ServerMode.MultipleLevelsQueryExecutor.QueryValuesCore(ISelectCriteriaConvertible column, SortCriteria sort, List`1 filter, Int32 topCount, Boolean isTopPercentage)
  at DevExpress.PivotGrid.ServerMode.MultipleLevelsQueryExecutor.DevExpress.PivotGrid.ServerMode.IServerModeQueryExecutor.QueryValues(IServerModeHelpersOwner owner, QueryColumn column, Dictionary`2 values)
  at DevExpress.PivotGrid.ServerMode.ServerModeDataSource.DevExpress.PivotGrid.ServerMode.IServerModeHelpersOwner.QueryValues(QueryColumn column, Dictionary`2 values)
  at DevExpress.PivotGrid.QueryMode.UniqueValues`1.GetUniqueValues(AreasType column)
  at DevExpress.PivotGrid.QueryMode.UniqueValues`1.GetUniqueValues(PivotGridFieldBase field)
  at DevExpress.Web.ASPxPivotGrid.PivotGridField.DevExpress.Web.FilterControl.IFilterColumn.get_PropertiesEdit()
  at DevExpress.Web.FilterControl.FilterControlColumnBuilder.CreateFilterControlColumn(IFilterColumn externalColumn)
  at DevExpress.Web.FilterControl.FilterControlColumnBuilder.CreateMissingExternalColumns()
  at DevExpress.Web.FilterControl.FilterControlColumnBuilder.GenerateColumns(Object sourceType, Boolean allowHierarchicalColumns, Int32 maxHierarchyDepth, Boolean showAllDataSourceColumns, IEnumerable`1 externalColumns)
  at DevExpress.Web.ASPxPivotGrid.ASPxPivotGrid.GenerateFilterColumns()
  at DevExpress.Web.ASPxPivotGrid.ASPxPivotGrid.DevExpress.Web.FilterControl.IFilterControlOwner.GetFilterColumns()
  at DevExpress.Web.FilterControl.WebFilterCriteriaDisplayTextGenerator.GetFilterColumnName(String propertyName)
  at DevExpress.Web.ASPxPivotGrid.Internal.PivotWebFilterCriteriaDisplayTextGenerator.GetFilterColumnName(String propertyName)
  at DevExpress.Web.FilterControl.WebFilterCriteriaDisplayTextGenerator.DevExpress.Data.Filtering.Helpers.IDisplayCriteriaGeneratorNamesSource.GetDisplayPropertyName(OperandProperty property)
  at DevExpress.Data.Filtering.Helpers.DisplayCriteriaGenerator.Convert(OperandProperty theOperand)
  at DevExpress.Data.Filtering.Helpers.DisplayCriteriaGenerator.Visit(BinaryOperator theOperator)
  at DevExpress.Web.FilterControl.WebFilterCriteriaDisplayTextGenerator…ctor(IFilterControlOwner filterOwner, CriteriaOperator criteria, Boolean encodeValue)
  at DevExpress.Web.ASPxPivotGrid.Internal.PivotWebFilterControlPopupRow.CreateFilterCriteriaDisplayTextGenerator(IFilterControlOwner filterOwner, Boolean encodeValue)
  at DevExpress.Web.FilterControl.WebFilterControlPopupRow.GetFilterCriteriaText(IFilterControlOwner filterOwner, Boolean encodeValue)
  at DevExpress.Web.FilterControl.WebFilterControlPopupRow.CreateControlHierarchy()
  at DevExpress.Web.Internal.InternalTable.CreateChildControls()
  at System.Web.UI.Control.EnsureChildControls()
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  at DevExpress.Web.ASPxPivotGrid.ASPxPivotGrid.EnsureChildControlsRecursive(Control control, Boolean skipContentContainers)
  at DevExpress.Web.ASPxWebControlBase.EnsureChildControlsRecursive(Control control)
  at DevExpress.Web.ASPxWebControlBase.CreateChildControls()
  at DevExpress.Web.ASPxWebControl.CreateChildControls()
  at System.Web.UI.Control.EnsureChildControls()
  at DevExpress.Web.ASPxPivotGrid.ASPxPivotGrid.GetCallbackResult()
  at DevExpress.Web.ASPxWebControl.System.Web.UI.ICallbackEventHandler.GetCallbackResult()

Show previous comments (4)

    Hello
    I see the attached example you.
    Used me sources are empty, and the data is successfully displayed in the table, but using a template prefilter error.
    I have this same situation you have a demo example. https://demos.devexpress.com/MVCxPivotGridDemos/Features/DataBindingToLargeDatabase
    If I cut out all of the fields from the PivotGrid for which https://www.devexpress.com/Support/Center/Question/Details/T335332 fails the current there is no error.
    If you cannot identify the problem, I will try to assemble the demo example.

    DevExpress Support Team 9 years ago

      I was unable to replicate the problem with MVCxPIvotGrid demo. It will require more time to test this functionality with data sources provided in the T335332: Sequence contains no matching element thread. I will notify you of our results.

      DevExpress Support Team 9 years ago

        I have managed to reproduce the described problem on my side with the provided MS SQL database. It will require some time to research it in greater detail. I have passed this issue to our developers for further research. We will update the thread once we have any results.

        A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
        Additional information: Sequence contains no matching element

        Answers approved by DevExpress Support

        created 9 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.