微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

通过尝试第二次查看报告,“报告查看器缩放”部分出现问题

如何解决通过尝试第二次查看报告,“报告查看器缩放”部分出现问题

我有此表单和一个报表查看器控件来显示我的报表,输入parameres后我运行该项目以检索报表,所有选项(例如打印,保存,放大/缩小)和其他选项均能正常工作,但唯一的问题是当我从[整个页面]视图放大报表并使用此设置(放大)大小关闭表单,然后再次打开该表单并第二次查看该报表时,放大,我无法向上或向下滚动以查看整个页面,并且缩小选项无法回答,以下是我的代码...

Private Sub VieReportButton_Click(sender As Object,e As EventArgs) Handles rptViewbtn.Click
Try
   Dim rds As New ReportDataSource("DataSet1",spGLstatementBindingSource)
   rvControl.LocalReport.DataSources.Add(rds)
   rvControl.LocalReport.ReportEmbeddedResource = "Beans.GLstatement.rdlc"
   Dim command As New sqlCommand("Execute spGLstatementInfo '" & prm2.Text & "','" & prm1.SelectedValue & "' ",connection)
   Dim adapter As New sqlDataAdapter(command)
   Dim table As New DataTable
   adapter.Fill(table)
   Dim acName As New ReportParameter("GLName",table.Rows(0)(0).ToString)
   Dim acNameTxt As New ReportParameter("GLNameTxt",rptAcName)
   Dim acNumber As New ReportParameter("GLNumber",table.Rows(0)(1).ToString())
   Dim acNumberTxt As New ReportParameter("GLNumberTxt",rptAcNo)
   Dim acCategory As New ReportParameter("GLCategory",table.Rows(0)(2).ToString())
   Dim acCategoryTxt As New ReportParameter("GLCategoryTxt",rptAcCategory)
   Dim acCcy As New ReportParameter("GLCurrency",table.Rows(0)(3).ToString())
   Dim acCcyTxt As New ReportParameter("GLCurrencyTxt",rptAcCcy)
   Dim acStatus As New ReportParameter("GLStatus",table.Rows(0)(4).ToString())
   Dim acStatusTxt As New ReportParameter("GLStatusTxt",rptAcStatus)
   Dim acBal As New ReportParameter("GLBalance",table.Rows(0)(5).ToString())
   Dim acBalTxt As New ReportParameter("GLBalanceTxt",rptAcCurrentBalance)
   Dim user As New ReportParameter("UserID",UserID)
   Dim userTxt As New ReportParameter("UserIDTxt",rptUserID)
   Dim AccStm As New ReportParameter("ReportName",GlAccStatement)
   Dim coName As New ReportParameter("comName",ComName)
   Dim glStmRef As New ReportParameter("GLStmRef",rptRef)
   Dim glStmDate As New ReportParameter("GLStmDate",rptDate)
   Dim glStmNarration As New ReportParameter("GLStmNarration",rptNarration)
   Dim glStmDebit As New ReportParameter("GLStmDebit",rptDebit)
   Dim glStmCredit As New ReportParameter("GLStmCredit",rptCredit)
   Dim glStmBalance As New ReportParameter("GLStmBalance",rptBalance)
   Dim glStmDateTime As New ReportParameter("GLStmRptDateTime",ReportDateTime)
   Me.rvControl.LocalReport.SetParameters(New ReportParameter() {acName,acNameTxt,acNumber,acNumberTxt,acCategory,acCategoryTxt,acCcy,acCcyTxt,acStatus,acStatusTxt,acBal,acBalTxt,user,userTxt,AccStm,coName,glStmRef,glStmDate,glStmNarration,glStmDebit,glStmCredit,glStmBalance,glStmDateTime})
   Me.spGLstatementTableAdapter.Fill(Me.beansDataSet.spGLstatement,prm2.Text,prm1.SelectedValue,rptPrmFromDate.Value,rptPrmToDate.Value)
   Me.rvControl.SetdisplayMode(displayMode.PrintLayout)
   Me.rvControl.ZoomMode = ZoomMode.FullPage
   Me.rvControl.RefreshReport()
Catch ex As Exception
   MessageBox.Show(ex.Message,"GL Statement")
End Try

结束子

This screenshot is normal to view and after this,I zoom in the report to 200 % and close the from

And this screenshot shows the second commit to view a report that I am not able to scroll up

几个月来我一直在为这个错误或问题苦苦挣扎,我尝试了以下代码,但是没有用,非常感谢希望您的开发人员帮助我解决这个问题...

Me.rvControl.Reset()
Me.rvControl.LocalReport.DataSources.Clear()
Me.rvControl.LocalReport.ReportEmbeddedResource = nothing
Me.rvControl.LocalReport.dispose()

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。