Current filter:
                                You should refresh the page.
                                0
                                  • Hi DevEx

                                    I am suffering from the poor performance of the script editor in my EUD, to the point where it crashes almost every time I try to do anything in it. How can I disable the syntax highlighting in the script editor? I've seen the suggestion in the peer-to-peer section of http://www.devexpress.com/Support/Center/p/Q323768.aspx, but I am using the XRDesignRibbonController, XRDesignMDIController and XRDesignDockManager.

                                    Regards
                                    Simon

                                0

                                Hello Simon,

                                Thank you for your message. I believe that we have already answered a similar question in the Regarding Script in Xtrareport thread. We are looking forward to your feedback once you have had the opportunity to try recommendations from this thread.

                                Thanks,
                                Alessandro.

                                0

                                Hi Alessandro

                                The related bug report, B208912 mentioned in the link is marked as private. Can you elaborate a little, such as where the code snippet should appear. I have tried it in the xrDesignMdiController_DesignPanelLoaded event but any attempt to retrieve the ScriptControl always returns null.

                                Thanks
                                Simon

                                0

                                Simon,

                                Please accept my apologies. You can use the following code for this purpose:

                                	
                                [C#]
                                private void Form1_Load(object sender, EventArgs e) { XtraReport1 report = new XtraReport1(); report.DesignerLoaded += new DevExpress.XtraReports.UserDesigner.DesignerLoadedEventHandler(report_DesignerLoaded); report.ShowDesignerDialog(); } void report_DesignerLoaded(object sender, DevExpress.XtraReports.UserDesigner.DesignerLoadedEventArgs e) { ScriptControl scriptControl = e.DesignerHost.GetService(typeof(ScriptControl)) as ScriptControl; SyntaxEditor syntaxEditor = typeof(ScriptControl).GetField("syntaxEditor", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(scriptControl) as SyntaxEditor; syntaxEditor.RemoveService(typeof(ISyntaxHighlightService)); }

                                Attached is a complete sample that illustrates this approach in action. Hope this will help you.

                                Thanks,
                                Alessandro.

                                Q394827.zip
                                0

                                Thanks for this, but my point is that I'm not using the standard report designer. I'm using a custom EUD, with the XRDesignRibbonController, XRDesignMDIController and XRDesignDockManager. So how can I use this approach on a custom EUD?

                                Thanks
                                Simon

                                0

                                Hi Simon,

                                Please modify your source code as shown below to accomplish this task.

                                	
                                [C#]
                                ... private void Form1_Load(object sender, EventArgs e) { XtraReport1 report = new XtraReport1(); report.DesignerLoaded += new DevExpress.XtraReports.UserDesigner.DesignerLoadedEventHandler(report_DesignerLoaded); //NEW RibbonForm1 ribbonForm = new RibbonForm1(); ribbonForm.xrDesignMdiController1.OpenReport(report); ribbonForm.Show(); //report.ShowDesignerDialog(); } void report_DesignerLoaded(object sender, DevExpress.XtraReports.UserDesigner.DesignerLoadedEventArgs e) { ScriptControl scriptControl = e.DesignerHost.GetService(typeof(ScriptControl)) as ScriptControl; SyntaxEditor syntaxEditor = typeof(ScriptControl).GetField("syntaxEditor", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(scriptControl) as SyntaxEditor; syntaxEditor.RemoveService(typeof(ISyntaxHighlightService)); } ...

                                Thanks,
                                Elliot

                                0

                                From what I can see, the ScriptControl is not created until the first time I switch to the Scripts in the designer. So at present when the designer is loaded, the ScriptControl always returns null.

                                0

                                Hi Simon,

                                I am afraid I cannot find an appropriate solution to your problem without additional information. Would you post here a small sample project that demonstrates your issue? We will examine it and try to find an appropriate solution for you.

                                Thanks,
                                Elliot

                                0

                                Hi Elliot

                                Please find attached a sample application with the attempted approach of disabling syntax highlighting.

                                Thanks
                                Simon

                                ReportEUDScriptTest.zip
                                0

                                Hi Simon,

                                At present, I am unable to reproduce the problem you described. I have created and attached a screencast, illustrating my actions. Please review it and let me know whether the actions I performed are correct. It is possible that I missed something essential.

                                Thanks,
                                Elliot

                                Q394827.swf
                                0

                                Hi Elliot

                                That's very strange as that is exactly what I did but it didn't work for me! Are you targeting 2.8 or 2.11 though? I'm thinking I should upgrade to the latest version to see if this resolves it.

                                Thanks
                                Simon

                                0

                                I upgraded to 11.2.11 and it now works as expected.

                                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.