Current filter:
                                You should refresh the page.
                                Support Center
                                3
                                  • Hi, I have implemented an action which of the selected report export to the file and then send it as the email attachment in my XAF win application.
                                    It works correctly, but when selected report contains the script, error occurs during export:

                                    There are following errors in script(s):
                                    line 1, column 109: error CS1001: Identifier expected
                                    line 1, column 110: error CS1002: ; expected
                                    line 1, column 111: error CS1519: Invalid token '-' in class, struct, or interface member declaration
                                    line 1, column 120: error CS1519: Invalid token ';' in class, struct, or interface member declaration


                                    Stack Trace:
                                    v DevExpress.XtraReports.UI.XtraReport.CreateDocument(Single progressRange, Boolean buildPagesInBackground, Boolean suppressClearDataContext)
                                    v DevExpress.XtraReports.UI.XtraReport.CreateDocument(Single progressRange, Boolean buildPagesInBackground)
                                    v DevExpress.XtraReports.UI.XtraReport.CreateIfEmpty(Single progressRange, Boolean buildPagesInBackground)
                                    v DevExpress.XtraReports.UI.XtraReport.CreateIfEmpty(Single progressRange)
                                    v DevExpress.XtraReports.UI.XtraReport.ExportToHtml(Stream stream, HtmlExportOptions options)
                                    v DevExpress.XtraReports.UI.XtraReport.ExportToHtml(Stream stream)

                                    When I use to export a standard export action in application, so it works.
                                    My code load and export report:

                                    [C#]
                                    XtraReport xtraReport = new XtraReport(); using (MemoryStream memoryStream = new MemoryStream(myContentFromReport)) { xtraReport.LoadLayout(memoryStream); } if (parameters != null && parameters.Length > 0) { foreach (var paramater in parameters) { xtraReport.Parameters[paramater.Key].Value = paramater.Value; } } XPCollection xpCollection = new XPCollection(XpoSession, myDataType); xpCollection.Criteria = CriteriaOperator.Parse(xtraReport.FilterString, parameters); xtraReport.DataSource = xpCollection; using (MemoryStream reportMemoryStream = new MemoryStream()) { xtraReport.ExportToPdf(reportMemoryStream); //error reportMemoryStream.Seek(0, System.IO.SeekOrigin.Begin); }
                                    Am I doing something wrong?
                                    Thanks.

                                • Hi Martin.

                                  I am afraid the information you provided is insufficient to diagnose this issue. These errors seem to be specific to the report layout you loaded. It is also unclear where you are getting myContentFromReport from and how it was produced. If the layout was obtained from XafReport, then you need to create an XafReport instance (via the IReportData.LoadReport method, for example). Would you please provide us with a small sample project reproducing the issue? We will research it, and do our best to find a solution.

                                • MAggarwal 09.17.2014

                                  DevExpress support sucks. This error still occurs and there is no reasonable explanation. It have been reported by many people and every report have comment like, need more information.

                                • @MAggarwal:

                                  While I understand your frustration and we regret to hear of such exceptional experience with our tools, such an abusive language is not tolerated here.
                                  I think you also understand that there are many cases (and it happens in the real world too!) when it is impossible to determine the cause of a certain failure without requesting additional information such as a project reproducing the same behavior, because problems are often not reproducible in vanilla test samples due to having dependencies on other customer project parts or environment. Regardless, we never refuse to help and are ready to research entire customer projects, even though it takes way more time to deploy, compile, debug and research them.

                                  Returning to this particular issue, are you also experiencing the same issue in an XAF application using reports on version 12.2? From your DevExpress profile, it does not look like you are using XAF and thus the same repro steps. If you happen to use similar code, this error means that the report layout was either incorrectly serialized when being saved or was corrupted later and thus cannot be normally loaded. To determine what is wrong, it would be great to receive a string representation of the "myContentFromReport" stream from you. Even better, feel free to post your project that replicates the same behavior. Having your project and repro steps, we can quickly rebuild it using the DevExpress source code and determine the cause of this error. We want to help you and look forward to hearing from you.

                                You must  log in  or  register  to leave comments

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners