报告查看器 - 显示报告新页面中的每条记录 [英] Report Viewer - display each record in the new page of the report
问题描述
大家好,我使用VB和报告查看器创建了一个报告。但是,报告不是标准的表格报告,它实际上是一个打印输出,它将数据从表单转换为打印版本。我将表单中的数据提供给数据集,然后报表查看器可以显示表单中的单个记录。
如下示例代码:
r = ds.BCR.NewRow
r("ref_no")= txtRefNo.text
r("description") = txtDesc.text
r(" quatity")= txtQuatity.text
ds.BCR.Rows.Add(r)
frmReport.ReportViewer.Reset()
Dim rds正如Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource
rds.Value = ds.Tables(0)
rds.Name =" DataSet"
frmReport.ReportViewer .LocalReport.DataSources.Add(rds)
frmReport.ReportViewer.LocalReport.ReportEmbeddedResource =" report.rdlc"
frmReport.ReportViewer.LocalReport.ReportPath =" report.rdlc"
现在,我正在寻找一种可以在数据网格中选择多条记录的解决方案,然后报表查看器可以在多个页面中显示所有这些记录(每页1条记录)。
有没有专家可以提供帮助?
Hi all, I have created a report by using the VB and the Report Viewer. However, the report is not a standard table report, it is actually a printout which turns the data from the form to a printed version. I feed the data from the form to dataset and then the report viewer can display the single record in the form.
Sample code as below:
r = ds.BCR.NewRow
r("ref_no") = txtRefNo.text
r("description") = txtDesc.text
r("quatity") = txtQuatity.text
ds.BCR.Rows.Add(r)
frmReport.ReportViewer.Reset()
Dim rds As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource
rds.Value = ds.Tables(0)
rds.Name = "DataSet"
frmReport.ReportViewer.LocalReport.DataSources.Add(rds)
frmReport.ReportViewer.LocalReport.ReportEmbeddedResource = "report.rdlc"
frmReport.ReportViewer.LocalReport.ReportPath = "report.rdlc"
Now, I am looking for a solution that can select multiple records in a datagrid and then the report viewer can display all of them in multiple pages (1 record per page).
Is any expert can help?
推荐答案
Steve Steve,
Hi Steve,
这篇关于报告查看器 - 显示报告新页面中的每条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!