如何使标题仅出现在rdlc报告/报告查看器的第一页上,但信息页标题仍然出现在vb.net中的每个页面上

问题描述 投票:0回答:1

我想让标题仅出现在 rdlc 或报表查看器的第一页上,但信息页面仍然出现在 vb.net 中的每个页面标题上,结果应该只有 2 页,因为标题出现,所以它变成了 3 页。

下面我分享rdlc报告文件的链接。请指导我。

链接rdlc文件

谢谢

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim order = OrderBusiness.GetOrder()
        Me.OrderBindingSource.DataSource = order
        Me.OrderDetailBindingSource.DataSource = order.OrderDetails
        Me.ReportViewer1.RefreshReport()
    End Sub
End Class
Public Class Order
    Public Property CustomerName() As String
    Public Property OrderDetails() As List(Of OrderDetail)
End Class
Public Class OrderDetail
    Public Property No() As Integer
    Public Property ProductName() As String
    Public Property UnitPrice() As Integer
    Public Property Quantity() As Integer
    Public Property Discount() As Integer
End Class
Public Class OrderBusiness
    Public Shared Function GetOrder() As Order
        Return New Order() With {
                .CustomerName = "John Doe",
                .OrderDetails = New List(Of OrderDetail)() From {
                    New OrderDetail() With {
                        .No = 1,
                        .ProductName = "TEST1",
                        .UnitPrice = 100,
                        .Quantity = 1,
                        .Discount = 0
                    },
                    New OrderDetail() With {
                        .No = 2,
                        .ProductName = "TEST2",
                        .UnitPrice = 200,
                        .Quantity = 2,
                        .Discount = 50
                    },
                    New OrderDetail() With {
                        .No = 3,
                        .ProductName = "TEST3",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                      New OrderDetail() With {
                         .No = 4,
                        .ProductName = "TEST4",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 5,
                        .ProductName = "TEST5",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 6,
                        .ProductName = "TEST6",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                        .No = 7,
                        .ProductName = "TEST7",
                        .UnitPrice = 100,
                        .Quantity = 1,
                        .Discount = 0
                    },
                    New OrderDetail() With {
                        .No = 8,
                        .ProductName = "TEST8",
                        .UnitPrice = 200,
                        .Quantity = 2,
                        .Discount = 50
                    },
                    New OrderDetail() With {
                        .No = 9,
                        .ProductName = "TEST9",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                      New OrderDetail() With {
                        .No = 10,
                        .ProductName = "TEST10",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 11,
                        .ProductName = "TEST11",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 12,
                        .ProductName = "TEST12",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                        .No = 13,
                        .ProductName = "TEST13",
                        .UnitPrice = 200,
                        .Quantity = 2,
                        .Discount = 50
                    },
                    New OrderDetail() With {
                        .No = 14,
                        .ProductName = "TEST14",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                      New OrderDetail() With {
                        .No = 15,
                        .ProductName = "TEST15",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 16,
                        .ProductName = "TEST16",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 17,
                        .ProductName = "TEST17",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                        .No = 18,
                        .ProductName = "TEST18",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                        .No = 19,
                        .ProductName = "TEST19",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    },
                     New OrderDetail() With {
                         .No = 20,
                        .ProductName = "TEST20",
                        .UnitPrice = 50,
                        .Quantity = 3,
                        .Discount = 0
                    }
                }
            }
    End Function

End Class

打印布局第1页

打印布局第2页

打印布局第3页

vb.net report rdlc reportviewer
1个回答
0
投票

如果您必须仅显示一个报告徽标(即没有组),您可以通过将您的徽标移动到

Body
上方的
Tablix
部分来解决此问题。

© www.soinside.com 2019 - 2024. All rights reserved.