Current filter:
                                You should refresh the page.
                                  • Hi Team,

                                    is it possible to somehow cache designer on the front?
                                    My case is that I have template in two language versions which user can edit in the designer. So the user open designer and edit one version, then can switch, using radio buttons outside of the designer, to second version (I don't open report from menu->open, I fetch another ReportDesignerModel overwriting [reportUrl] property of dx-report-designer) and edit second one. After editing the user save both language versions of the template using SAVE button outside of the designer.
                                    I wouldn't like to be saving each language versions separately.

                                    Regards

                                1 Solution

                                Creation Date Importance Sort by

                                Hi,

                                Please accept our apologies for the delayed response. Note that our Web Report Designer uses the MDI interface. It means that you can open all desired reports in a single instance of Web Report Designer and use tabs at the bottom of the Web Report Designer's UI to switch reports previewed there. To open additional reports in your Web Report Designer use its client-side BeforeRender  event handler:

                                [JavaScript]
                                export class AppComponent { // The URL of a report to open in the Report Designer when the application starts. reportUrl: string = 'ReportA'; ... BeforeRender(event) { //Open additional reports here event.sender.OpenReport('ReportB'); } ... }

                                However, currently our Web Report Designer does not provide a built-in "Save All" button that saves all reports at once. However, you can easily add this button yourself by using the CustomizeMenuActions event handler. For example, use the following code:

                                [JavaScript]
                                CustomizeMenuActions(event) { event.args.Actions.push({ text: "Save All", imageClassName: "dxrd-image-save", imageTemplateName: "dxrd-svg-menu-save", disabled: ko.observable(false), visible: true, hasSeparator: false, clickAction: function (report) { var designerModel = event.sender.GetDesignerModel(); var tabs = event.sender.GetTabs(); tabs.forEach(tab => { if (tab.isDirty()) { if (!tab.url()) { //Save with dialog designerModel.saveReportDialog.show(tab); } else { //Save without dialog event.sender.ReportStorageSetData(tab.context().report.serialize(), tab.url()) .done(function (result) { tab.isDirty(false); DevExpress.Analytics.Internal.ShowMessage(DevExpress.Analytics.Utils.getLocalization("The report has been successfully saved.", "ASPxReportsStringId.ReportDesigner_SaveReport_Message_OK"), DevExpress.Analytics.Internal.NotifyType.success); }); } } }); }, hotKey: { ctrlKey: true, keyCode: "A".charCodeAt(0) }, container: "menu" }); }

                                I have created a sample project that demonstrates this approach in action. You can find it in the attachment.

                                See also:
                                Report Designer's Client-Side API

                                Show all comments
                                • Customer81565 06.19.2019

                                  Thanks for example. It doesn't exactly fit to my needs but I will try adjust to my requirements.
                                  Is it possible to move tabs above report and how to change tabs names?

                                  Regards

                                • Vasily (DevExpress Support) 06.20.2019

                                  Hi,

                                  Thank you for your update. Currently our Web Report Designer does not provide the capability to display tabs above the report. However, you can switch tabs by using your own code. For example, use the following code to activate tabs by using buttons placed above the Web Report Designer:

                                  Html:

                                  [HTML]
                                  <button (click)="ActivateReport('ReportA')">Report A</button> <button (click)="ActivateReport('ReportB')">Report B</button> <dx-report-designer ... > ... </dx-report-designer>

                                  TS:

                                  [JavaScript]
                                  import { ... , ViewChild } from '@angular/core'; import { DxReportDesignerComponent } from 'devexpress-reporting-angular'; ... export class AppComponent { @ViewChild(DxReportDesignerComponent) designer: DxReportDesignerComponent; ActivateReport(reportUrl) { var designerModel = this.designer.bindingSender.GetDesignerModel(); designerModel.navigateByReports.switch(designerModel.navigateByReports.tabs().filter(t => t.url() == reportUrl)[0]); } ... }

                                  Finally use your reports' DisplayName property to specify tab names.

                                • Customer81565 06.24.2019

                                  Hi Vasily,

                                  thanks for your help.
                                  I would like handle server-side errors using onServerError event, but it looks like this method isn't called when the server side error is raised and I got always Internal Server Error. Is it any a issue with above event in Angular in version 19.1.3 of designer.

                                  Regards

                                • Customer81565 06.24.2019

                                  How I can call

                                  [JavaScript]
                                  DevExpress.ui.notify({ message: 'Duplicate report name is not allowed', type: 'error' });

                                  in version 19.1.3 of designer?

                                • Customer81565 06.25.2019

                                  The last question is out of date, you use ShowMessage in first example

                                  [JavaScript]
                                  DevExpress.Analytics.Internal.ShowMessage(DevExpress.Analytics.Utils.getLocalization("The report has been successfully saved.", "ASPxReportsStringId.ReportDesigner_SaveReport_Message_OK"), DevExpress.Analytics.Internal.NotifyType.success);

                                  but when I save two reports I can see just last message. Is it possible to show two message at once?

                                • Andrey (DevExpress Support) 06.25.2019

                                  Hello,
                                  Let me chime in while Vasily is out of the office. The client-side OnServerError can be handled in the same way as the client-side CustomizeMenuActions event in the project provided by Vasiliy. If the event doesn't fire on your side, please provide us with the modified project and describe steps to reproduce the problem.
                                  As far as I understand, you started using the DevExpress.Analytics.Internal.ShowMessage method instead of DevExpress.ui.notify. However, if the question about the notify method is still relevant for you, please let me know.
                                  As for your last question, a message is displayed as many times as many reports are saved. I have attached a sample video to illustrate this. Since it is not possible to display messages one above another, I suggest you collect the names of saved reports in a local variable, so the last message contains names of all saved reports. To accomplish this task, modify the CustomizeMenuActions event handler as follows:

                                  [JavaScript]
                                  CustomizeMenuActions(event) { event.args.Actions.push({ text: "Save All", imageClassName: "dxrd-image-save", imageTemplateName: "dxrd-svg-menu-save", disabled: ko.observable(false), visible: true, hasSeparator: false, clickAction: function (report) { var designerModel = event.sender.GetDesignerModel(); var tabs = event.sender.GetTabs(); var message = "" tabs.forEach(tab => { if (tab.isDirty()) { if (!tab.url()) { //Save with dialog designerModel.saveReportDialog.show(tab); } else { //Save without dialog event.sender.ReportStorageSetData(tab.context().report.serialize(), tab.url()) .done(function (result) { tab.isDirty(false); message = message + tab.url() + " " DevExpress.Analytics.Internal.ShowMessage(message + "successfully saved.", DevExpress.Analytics.Internal.NotifyType.success); }); } } }); }, hotKey: { ctrlKey: true, keyCode: "A".charCodeAt(0) }, container: "menu" }); }

                                  Please try this solution and let me know your result.

                                • Customer81565 06.26.2019

                                  Regarding to OnServerError event it was misspelling so now the situation looks like that the onServerError(event) method is called and breakpoint inside it is hitted but I still got 500 Internal Server Error event if GetData method looks like below and I'm trying fetch report which doesn't exist.

                                  [C#]
                                  public override byte[] GetData(string url) { // Returns report layout data stored in a Report Storage using the specified URL. // This method is called only for valid URLs after the IsValidUrl method is called. try { using (var reportFile = File.Open(Path.Combine(reportDirectory, url + FileExtension), FileMode.Open)) using (var memoryStream = new MemoryStream()) { reportFile.CopyTo(memoryStream); return memoryStream.ToArray(); } } catch (Exception) { throw new FaultException(new FaultReason(string.Format("Could not find report '{0}'.", url)), new FaultCode("Server"), "GetData"); } }

                                  Please find jpeg file with error object structure attached.

                                • Vasily (DevExpress Support) 06.27.2019

                                  Hi,

                                  Thank you for your update. As you are using the .NET Core platform, it is necessary to use the DevExpress.XtraReports.Web.ClientControls.FaultException exception class to pass an error message from the server to a client instead of using the System.ServiceModel.FaultException class.
                                  The DevExpress.XtraReports.Web.ClientControls.FaultException exception class was specially created to avoid adding the System.ServiceModel dependency to .NET Core projects. Check the code provided in the Handle Server-Side Errors in the Report Designer help topic for more information. Take special note that the "System.ServiceModel" namespace is registered in this code only if the "NETFRAMEWORK" preprocessor symbol is active.

                                • Customer81565 07.01.2019

                                  Hi Vasily,

                                  Now, I'm trying to add Authorization header to each requests from the designer. Is this header add for GET and POST methods?

                                  [JavaScript]
                                  import DevExpressAnalytics from '@devexpress/analytics-core' (DevExpressAnalytics.Analytics.Internal as any).ajaxSetup.ajaxSetting = { headers: { 'Authorization': `Bearer ${accessToken}` } }

                                  Regards

                                • Vasily (DevExpress Support) 07.01.2019

                                  Hi,

                                  It looks like this question is not directly related to the task that we discussed in this thread. So, I've created a separate ticket on your behalf for this question: T754439: How to add Authorization header to each requests from the designer. It has been placed in our processing queue and will be answered shortly.