Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I have problems with the attached report using this code:

                                    Private Sub CommonReportStarter(ByVal pRep As XtraReport)
                                        If <for staff only> Then
                                                Dim df As New DevExpress.XtraReports.UserDesigner.XRDesignFormEx
                                                df.OpenReport(pRep)
                                                df.Show()
                                            Else
                                                pRep.ShowPreview()
                                            End If
                                    End Sub

                                    Using the first If Then clause the report opens perfectly; if the code branches to the Else clause then the ShowPreview method fails with the following error (in my Win XP; and on my Win Vista laptop)

                                    There are following errors in script(s):
                                    line 29, column 0: error BC42020: Variable declaration without an 'As' clause; type of Object assumed.
                                    line 29, column 0: error BC30205: End of statement expected.
                                    line 310, column 0: error BC30451: Name 'Scheme_Performance' is not declared.
                                    line 314, column 0: error BC30451: Name 'Scheme_Performance' is not declared.
                                    line 318, column 0: error BC30451: Name 'Scheme_Performance' is not declared.
                                    line 322, column 0: error BC30451: Name 'Scheme_Performance' is not declared.

                                    Another method I have in the code uses r.ShowDesigner (r is declared as XtraReport) and this works.
                                    I have included all the DLLs as listed on the http://documentation.devexpress.com/#XtraReports/CustomDocument3189 page. I have updated from 11.1.7 to 11.1.8 and the issue remains.
                                    Can you shed any light on what I might look at please?

                                0

                                Hi Mark,

                                Thank you for contacting us. Would you please specify whether or not you have attached the correct report layout file. Your file has only 154 strings, but the error message appears on line 322. I looking forward to hearing from you.

                                Thanks,
                                Sergi

                                0

                                I have rerun the sequence giving me the trouble. I have resaved the report with sample data, and the following error was reported:

                                There are following errors in script(s):
                                line 29, column 0: error BC42020: Variable declaration without an 'As' clause; type of Object assumed.
                                line 29, column 0: error BC30205: End of statement expected.
                                line 411, column 0: error BC30451: Name 'Scheme_Performance' is not declared.
                                line 415, column 0: error BC30451: Name 'Scheme_Performance' is not declared.
                                line 419, column 0: error BC30451: Name 'Scheme_Performance' is not declared.
                                line 423, column 0: error BC30451: Name 'Scheme_Performance' is not declared.

                                Some further information for you:
                                When I view the scripts page/tab, the last few lines are not syntax highlighted.

                                0

                                I believe I have located the source of the problem. The ShowPreview path does not like it if the XtraReport.Name property contains a '\' whereas the ShowDesigner and the XRDesignFormEx method above do not seem to mind this being present.
                                Removing the '\' removed the issue.

                                Thanks for your speedy reply yesterday!

                                Hope this helps you track down any difference in the code.

                                0

                                ...just to add to this.
                                The '\' was followed by the words 'Scheme Performance' - which is what the error was highlighting.

                                0

                                Hi Mark,

                                Thank you for your feedback. I am glad to hear that you have found a solution to the problem. Thank you for letting us know of your progress.
                                Please note that the XtraReport.Name property should require CodeDOM serialization rules. You can check this by using the following code:

                                [C#]
                                Dim str As String = "name\name" Dim name As Boolean = System.CodeDom.Compiler.CodeGenerator.IsValidLanguageIndependentIdentifier(str)

                                See the Is there a .NET function to validate a class name? article for additional information.

                                Thanks,
                                Sergi

                                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