Bug Report T1195630
Visible to All Users

NullReferenceException is thrown when a report is bound to a transformation-based data source

created a year ago

Steps to reproduce:

  1. Bind a report to ObjectDataSource that contains hierarchical structured data.
  2. Flatten the data source structure as described in the following help topic: Bind a Report to a Transformation-Based Data Source.

Expected results:

The data source structure is flattened and the report is bound without errors.

Current results:

NullReferenceException is thrown.

Call Stack
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=DevExpress.DataAccess.v23.1 StackTrace: DevExpress.DataAccess.v23.1.dll!DevExpress.DataAccess.EntityFramework.EFDataConnection.ExpandNullable(System.Type type) Unknown DevExpress.DataAccess.v23.1.dll!DevExpress.DataAccess.Native.TypeHelper.CanFlatten(System.Type columnType, out System.Collections.Generic.List<System.ComponentModel.PropertyDescriptor> properties) Unknown DevExpress.DataAccess.v23.1.dll!DevExpress.DataAccess.Native.TypeHelper.CanFlatten(System.Type columnType, System.Type columnTypeBeforeUnfold, string name, DevExpress.DataAccess.Native.Sql.ResultTable sqlTable, out System.Collections.Generic.List<System.ComponentModel.PropertyDescriptor> properties) Unknown DevExpress.DataAccess.v23.1.dll!DevExpress.DataAccess.Native.DataFederation.QueryBuilder.TransformationRulesGridItemData.List.DetectCanUnfoldAndFlatten(DevExpress.DataAccess.Native.DataFederation.QueryBuilder.AvailableItemData.ColumnData availableItemColumn, DevExpress.DataAccess.Native.DataFederation.QueryBuilder.TransformationRulesGridItemData data, DevExpress.DataAccess.Native.Sql.ResultTable sqlTable) Unknown DevExpress.DataAccess.v23.1.dll!DevExpress.DataAccess.Native.DataFederation.QueryBuilder.TransformationRulesGridItemData.List.RefreshGridData(DevExpress.DataAccess.DataFederation.Source source) Unknown DevExpress.DataAccess.v23.1.dll!DevExpress.DataAccess.Native.DataFederation.QueryBuilder.TransformationNodeViewModel.AddTable(DevExpress.DataAccess.DataFederation.Source source, string tableName) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Native.DataFederation.TransformationNodeView.AddTable(DevExpress.DataAccess.DataFederation.Source source, string tableName) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Native.DataFederation.QueryNodeViewBase.DevExpress.DataAccess.UI.Native.DataFederation.IQueryNodeView.AddTable(DevExpress.DataAccess.DataFederation.Source source, string tableName) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Native.DataFederation.QueryBuilderView.OnAddTable(object sender, DevExpress.DataAccess.UI.Native.DataFederation.SourceEventArgs e) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Native.DataFederation.AvailableViewPart.OnDoubleClick(object sender, System.EventArgs e) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.OnDoubleClick(System.EventArgs e) Unknown DevExpress.XtraEditors.v23.1.dll!DevExpress.XtraEditors.Container.EditorContainer.OnDoubleClick(System.EventArgs e) Unknown DevExpress.XtraTreeList.v23.1.dll!DevExpress.XtraTreeList.TreeList.OnDoubleClick(System.EventArgs e) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown DevExpress.XtraEditors.v23.1.dll!DevExpress.XtraEditors.Container.EditorContainer.WndProc(ref System.Windows.Forms.Message m) Unknown DevExpress.XtraTreeList.v23.1.dll!DevExpress.XtraTreeList.TreeList.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown [Native to Managed Transition] [Managed to Native Transition] System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form) Unknown System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner) Unknown DevExpress.Utils.v23.1.dll!DevExpress.XtraEditors.XtraForm.ShowDialog(System.Windows.Forms.IWin32Window owner) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.DataFederation.FederationDataSourceUIHelper.ManageQueries<DevExpress.DataAccess.Wizard.Model.FederationDataSourceModel>(DevExpress.DataAccess.DataFederation.FederationDataSourceBase dataSource, DevExpress.DataAccess.UI.DataFederation.ManageQueryContext context, System.Action<DevExpress.DataAccess.UI.Wizard.IWizardCustomization<DevExpress.DataAccess.Wizard.Model.FederationDataSourceModel>> customizeWizard) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Design.XRFederationDataSourceDesigner.ManageQueriesVerb.AnonymousMethod__1(DevExpress.LookAndFeel.UserLookAndFeel lookAndFeel, System.Windows.Forms.IWin32Window owner) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Design.XRFederationDataSourceDesigner.ManageVerb(string transactionName, System.ComponentModel.PropertyDescriptor collectionPropertyDescriptor, System.Func<DevExpress.LookAndFeel.UserLookAndFeel, System.Windows.Forms.IWin32Window, bool> manage) Unknown DevExpress.DataAccess.v23.1.UI.dll!DevExpress.DataAccess.UI.Design.XRFederationDataSourceDesigner.ManageQueriesVerb(object o, System.EventArgs e) Unknown System.dll!System.ComponentModel.Design.MenuCommand.Invoke() Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.Design.Commands.VerbCommandExecutor.ExecCommand(System.ComponentModel.Design.CommandID cmdID) Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.Design.Commands.CommandExecutorBase.ExecCommand(System.ComponentModel.Design.CommandID cmdID, object[] parameters) Unknown DevExpress.Data.v23.1.dll!DevExpress.XtraReports.Design.Commands.MenuCommandHandlerBase.ExecuteCommand(System.ComponentModel.Design.CommandID cmdID, object[] parameters) Unknown DevExpress.Data.v23.1.dll!DevExpress.XtraReports.Design.Commands.MenuCommandHandlerBase.OnMenuCommand(object sender, DevExpress.XtraReports.Design.Commands.CommandExecuteEventArgs e) Unknown DevExpress.Data.v23.1.dll!DevExpress.XtraReports.Design.Commands.CommandSetItem.Invoke(object[] args) Unknown DevExpress.Data.v23.1.dll!DevExpress.XtraReports.Design.Commands.MenuCommandHandlerBase.InvokeCommandEx(System.ComponentModel.Design.MenuCommand command, object[] args) Unknown DevExpress.Utils.v23.1.UI.dll!DevExpress.XtraReports.Design.XRMenuCommandServiceBase.GlobalInvoke(System.ComponentModel.Design.CommandID commandID, object[] args) Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.UserDesigner.Native.XRMenuCommandService.GlobalInvoke(System.ComponentModel.Design.CommandID commandID, object[] args) Unknown DevExpress.Utils.v23.1.UI.dll!DevExpress.XtraReports.Design.XtraContextMenuBase.CommandMenuItemInvoker.InvokeCommand() Unknown DevExpress.Utils.v23.1.UI.dll!DevExpress.XtraReports.Design.XtraContextMenuBase.CommandMenuItemBase.OnClick(DevExpress.XtraBars.BarItemLink link) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.BarItemLink.OnLinkClick() Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.BarButtonItemLink.OnLinkClick() Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.BarItemLink.OnLinkAction(DevExpress.XtraBars.BarLinkAction action, object actionArgs) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(DevExpress.XtraBars.BarLinkAction action, object actionArgs) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(DevExpress.XtraBars.BarItemLink link) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(DevExpress.XtraBars.BarItemLink link) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(System.Windows.Forms.MouseEventArgs e) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.Controls.CustomPopupBarControl.OnMouseUp(System.Windows.Forms.MouseEventArgs e) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown DevExpress.Utils.v23.1.dll!DevExpress.XtraEditors.XtraControl.WndProc(ref System.Windows.Forms.Message m) Unknown DevExpress.XtraBars.v23.1.dll!DevExpress.XtraBars.Controls.CustomControl.WndProc(ref System.Windows.Forms.Message msg) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown [Native to Managed Transition] [Managed to Native Transition] System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form) Unknown System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner) Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.UserDesigner.XRDesignRibbonForm.DevExpress.XtraReports.UserDesigner.IDesignForm.ShowDialog() Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.UI.ReportDesignTool.ShowDesignerDialog(DevExpress.XtraReports.UserDesigner.IDesignForm form, DevExpress.XtraReports.UserDesigner.DesignDockPanelType hiddenPanels) Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.UI.ReportDesignTool.ShowRibbonDesignerDialog(DevExpress.LookAndFeel.UserLookAndFeel lookAndFeel, DevExpress.XtraReports.UserDesigner.DesignDockPanelType hiddenPanels) Unknown DevExpress.XtraReports.v23.1.Extensions.dll!DevExpress.XtraReports.UI.ReportDesignTool.ShowRibbonDesignerDialog() Unknown > XtraReportDataSet.exe!XtraReportDataSet.Form1.Button3_Click(object sender, System.EventArgs e) Line 71 C# System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) Unknown System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e) Unknown System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) Unknown System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown [Native to Managed Transition] [Managed to Native Transition] System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form mainForm) Unknown XtraReportDataSet.exe!XtraReportDataSet.Program.Main() Line 27 C#

Answers approved by DevExpress Support

created a year ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Important Notes:

  • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
  • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.

    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.