Current filter:
                                You should refresh the page.
                                0
                                  • after i changed CustomAttribute("DisplayFormat","N2") to CustomAttribute("DisplayFormat","N0")
                                    the analysis display cell format does not change

                                    Steps to Reproduce:

                                    1.create a BO with a double property,set CustomAttribute("DisplayFormat","N2") to it

                                    2.create an analysis and layout ok,save it.

                                    3.change CustomAttribute("DisplayFormat","N2") to CustomAttribute("DisplayFormat","N0")

                                    4.reopen persistent analysis

                                    Actual Results:

                                    the cell format does not change. it format N2

                                    Expected Results:

                                    the cell changed with BO changes. it format N0

                                0

                                Hello Kevin,

                                Thanks for reporting the issue.
                                By default, fields formatting with all the pivot-chart control settings is saved in the database. Thus, if you change the formatting in code for existing analysis objects, it won't be applied. To apply it, you should recreate the existing analysis.
                                Please check out the code of the MainDemo.Module.Win.Updater and MainDemo.Module.Updater classes in the MainDemo to learn more on how to save the settings of the pivot-chart layout in the database.
                                Let us know in case of any difficulty.

                                Thanks,
                                Dennis

                                0

                                i think,that is truble for me.
                                we designed more analysis for my end-user persistent in database. we often change my design. if recreate a new analysis is hard work. do you provide a easy way to accomplish the task?

                                0

                                Hello Kevin,

                                Thanks for the feedback on this issue. We will try to find a workaround solution for you. Please bear with us.

                                Thanks,
                                Dennis

                                0

                                Hello Kevin,

                                This problem will be fixed in our next update. Currently, you can use the following controller as a workaround:

                                	
                                [C#]
                                public class RefreshDisplayFormatController : ViewController { public RefreshDisplayFormatController() { TargetObjectType = typeof(IAnalysisInfo); TargetViewType = ViewType.DetailView; } AnalysisControlWin analysisControl = null; protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); AnalysisEditorWin editor = (AnalysisEditorWin)((DetailView)View).FindItem("Self"); analysisControl = editor.Control; } protected override void OnActivated() { base.OnActivated(); Frame.GetController<AnalysisDataBindController>().BindDataAction.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(BindDataAction_Execute); } void BindDataAction_Execute(object sender, DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs e) { IAnalysisInfo analysisInfo = (IAnalysisInfo)View.CurrentObject; ApplicationNodeWrapper applicaitonNodeWrapper = new ApplicationNodeWrapper(Application.Model); ClassInfoNodeWrapper classInfo = applicaitonNodeWrapper.BOModel.FindClassByName(analysisInfo.DataType.FullName); foreach (PivotGridFieldBase field in analysisControl.Fields) { string formatString = classInfo.FindMemberByName(field.FieldName).DisplayFormat; field.ValueFormat.FormatString = formatString; field.CellFormat.FormatString = formatString; } analysisControl.PivotGrid.Refresh(); PivotGridSettingsHelper.SavePivotGridSettings(new PivotGridControlSettingsStore(analysisControl.PivotGrid), analysisInfo); } }

                                Thanks,
                                Anatol

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.