Bug Report T1175592
Visible to All Users

IDisplayNameProvider doesn't work in the Manage Queries dialog

created 2 years ago

Steps to reproduce:

  1. Create an application with the End-User Report Designer for WinForms.
  2. Create a report with a custom SQLDataSource as described in the following help topic: Provide Custom Names to the Field List Items.
  3. Use a class that implements the IDisplayNameProvider interface to customize the Report Wizard as follows:
C#
reportDesigner1.DataSourceWizardSettings.SqlWizardSettings.QueryBuilderLight = true; MyWizardCustomizationService customizationService = new MyWizardCustomizationService(); reportDesigner1.AddService(typeof(IWizardCustomizationService), customizationService); reportDesigner1.AddService(typeof(ISqlEditorsCustomizationService), customizationService); public class MyWizardCustomizationService : IWizardCustomizationService, ISqlEditorsCustomizationService { public void CustomizeDataSourceWizard(IWizardCustomization<XtraReportModel> tool) { tool.RegisterType<IDisplayNameProvider, MyDisplayNameProvider>(); } public void CustomizeEditor(SqlEditorId editor, IWizardCustomization<SqlDataSourceModel> tool) { tool.RegisterType<IDisplayNameProvider, MyDisplayNameProvider>(); } public void CustomizeReportWizard(IWizardCustomization<XtraReportModel> tool) { tool.RegisterType<IDisplayNameProvider, MyDisplayNameProvider>(); } public bool TryCreateDataSource(IDataSourceModel model, out object dataSource, out string dataMember) { dataSource = null; dataMember = null; return false; } public bool TryCreateReport(IDesignerHost designerHost, XtraReportModel model, object dataSource, string dataMember) { return false; } } public class MyDisplayNameProvider : IDisplayNameProvider { public MyDisplayNameProvider() { } string IDisplayNameProvider.GetDataSourceDisplayName() { return "Northwind"; } string IDisplayNameProvider.GetFieldDisplayName(string[] fieldAccessors) { string fieldName = fieldAccessors[fieldAccessors.Length - 1]; if (string.IsNullOrEmpty(fieldName)) return fieldName; return fieldName.ToUpper(); } }

Expected results:

IDisplayNameProvider should affect names in the Manage Queries dialog. For example, the code snippet above should convert all names to uppercase in the same way as in the Query Builder:
Clipboard-File-2.png

Current results:

IDisplayNameProvider doesn't affect names in the Manage Queries dialog:

Clipboard-File-1.png

Answers approved by DevExpress Support

created 2 years 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.