所以我有这个矩阵在我RDLC形式和我要的是在30停止行号,并继续在31在桌子的另一边
=RowNumber(Nothing)
是我使用的列表达什么
我用这令对方表出现
=(RowNumber(Nothing) - 1) Mod 2
正如你可以看到编号似乎没有权利,也是翻倍的数字
你可以试试这个一
第1步:
第2步:
页面看起来像这样的设计
第三步:
对于学生模型
public class Student
{
public int RollNo { get; set; }
public string Name { get; set; }
}
第四步:
在后面的代码做拆分数据
List<Student> studentModelList = new List<Student>();
for (int i = 1; i <= 60; i++)
{
studentModelList.Add(new Student()
{
Name = "Student" + i,
RollNo = i
});
}
ReportDataSource Part1DataSource = new ReportDataSource();
Part1DataSource.Name = "Part1"; // Name of the DataSet we set in .rdlc
Part1DataSource.Value = studentModelList.Take(studentModelList.Count/2);
ReportDataSource Part2DataSource = new ReportDataSource();
Part2DataSource.Name = "Part2"; // Name of the DataSet we set in .rdlc
Part2DataSource.Value = studentModelList.Skip(studentModelList.Count / 2);
reportViewer.LocalReport.ReportPath = @"Report4.rdlc"; // Path of the rdlc file
reportViewer.LocalReport.DataSources.Add(Part1DataSource);
reportViewer.LocalReport.DataSources.Add(Part2DataSource);
reportViewer.RefreshReport();
第五步:
产量