报告查看器 - 显示报告新页面中的每条记录 [英] Report Viewer - display each record in the new page of the report

查看:57
本文介绍了报告查看器 - 显示报告新页面中的每条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我使用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,
您可以在创建报告时尝试更改页面设置(纸张尺寸:自定义,宽度:8.5英寸,高度:0.5英寸)属性。
 Can you try by making changes in page Setup(Paper Size:Custom, Width:8.5 inch, Height:0.5 inch) property while creating your report.


这篇关于报告查看器 - 显示报告新页面中的每条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆