Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I call GetCurrentRow.Row()("F1") to get the value for F1 before the detail band is printed.

                                    If I need to get multiple fields, I call GetCurrentRow.Row() multiple times (one for each field). Is there a better or more efficient way to do this?

                                0

                                Hi Young,

                                Yes it's possible. You can cast the object which is passed from the GetCurrentRow() method to the appropriate type (DataRowView) and then get all required values from it.
                                Otherwise, you can use the XtraRepor.GetCurrentColumnValue() method to get only appropriate column.
                                Please feel free to contact us if you need any additional assistance. We will be happy to help you.

                                Thanks,
                                Andrew

                                0

                                Thanks. Can you please show me how to cast GetCurrentRow to a DataRowView?

                                0

                                Hi Young Lim,

                                Sure, here's a sample code snippet:

                                	
                                [VB.NET]
                                Private Sub Detail_BeforePrint(ByVal sender As Object, ByVal e As PrintEventArgs) ' Get the value of the current row in the master report. xrLabel1.Text = (CType(GetCurrentRow(), DataRowView)).Row("CategoryName").ToString() ' Get the value of the current cell in the CategoryName column in the master report. xrLabel2.Text = GetCurrentColumnValue("CategoryName").ToString() End Sub

                                See also: CType Function.

                                Thanks,
                                Alex

                                To start a chat you should create a support ticket


                                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