Current filter:
                                You should refresh the page.
                                  • In our app we have a form to edit reports. Our customer often edit reports with lots of data, so when a customer edits a report, we open the report with an empty dataset (schema). When the customer goes to the preview we retrieve the actual data, but after replacing the reports datasource, we notice the datasource is being shown twice in the Field List. Could you explain why this happens and offer a fix/workaround?
                                    Attached a sample application and screenshot to illustrate the problem .
                                    Steps to reproduce:
                                    - run sample application
                                    - click button to open report
                                    - go to preview of the report
                                    - confirm the prompt to refresh to data for the preview
                                    - return to the design-view and notice there are two datasets in the Field List

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Martijn,

                                It is necessary to delete the old report's data source from the designer host to resolve this issue. Here is a corresponding code snippet:

                                [C#]
                                IDesignerHost host = (IDesignerHost)xrDesignPanel1.GetService(typeof(IDesignerHost)); host.Container.Remove((DataSet)xrDesignPanel1.Report.DataSource); // Update designer (the preview-report is merely a copy) xrDesignPanel1.Report.DataSource = this.previewDataSet;

                                Thanks,
                                Elliot

                                • Martijn Loeffen 08.30.2019

                                  Thank you Elliot: works like a charm!

                                • Elliot (DevExpress Support) 08.30.2019

                                  Hello Martijn,

                                  I realize this may be a lot to ask, but if you are happy with DevExpress Reports, please take a moment to rate our product on Capterra – the direct link to our listing is: https://www.capterra.com/p/181493/DevExpress-Reporting/

                                  Thanks,
                                  Elliot

                                  P.S.  Would you mind if I mark this ticket public to make this solution available for other customers who may have this question?

                                • Martijn Loeffen 08.30.2019

                                  Hi Elliot, I've made the ticket public and I'll have a look at Capterra.