Current filter:
                                You should refresh the page.
                                Support Center
                                  • 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?


                                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. Can you please show me how to cast GetCurrentRow to a DataRowView?


                                Hi Young Lim,

                                Sure, here's a sample code snippet:

                                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.


                                If you need additional product information, write to us at 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, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

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