本文介绍了将早期版本的crystal报告导入visual studio 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我们公司有一个旧的Windows应用程序。该程序由VB.net使用visual studio 2003开发。

There is an old windows application in our company. The program has been developed by VB.net using visual studio 2003.

我在visual studio 2005中打开了该项目并成功转换它。

I opened the project in visual studio 2005 and that convert it successfully.

唯一的问题是:

在所有报告中,用户必须填写已在代码填写过期间填写的参数字段运行 。

In all reports users have to fill parameter fields which have been filled by code during runtime .  

以下您将找到示例代码:

The follow you will find sample code  :

Dim oRpt As CryRepFrmCustomer '创建新报告对象

Dim oRpt As New CryRepFrmCustomer ' create new report object

oRpt.SetParameterValue(0,StrDateOfDay)

oRpt.SetParameterValue(0, StrDateOfDay)

oRpt.SetParameterValue (1,Pu_CompanyName)

oRpt.SetParameterValue(1, Pu_CompanyName)

oRpt.SetDataSource(DS.Tables(ViewTable)) '设置报告数据源

oRpt.SetDataSource(DS.Tables(ViewTable)) ' set the reports data source

Dim FrmReport As New FrmReport

Dim FrmReport As New FrmReport

FrmReport.CrystalReportViewer1.ReportSource = oRpt '将观众报告源设置为out报告对象

FrmReport.CrystalReportViewer1.ReportSource = oRpt ' set the viewers report source to out report object

'CrystalReportViewer1.DataBind()'绑定报告对象和数据到报告查看器

'CrystalReportViewer1.DataBind() ' bind the report object and data to the report viewer

FrmReport.CrystalReportViewer1.Refresh()

FrmReport.CrystalReportViewer1.Refresh()

FrmReport.CrystalReportViewer1。 DisplayGroupTree = False '隐藏下钻部分

FrmReport.CrystalReportViewer1.DisplayGroupTree = False 'hide the drilldown section

FrmReport.Show()

FrmReport.Show()

问候

Saman

ps:当我编译时Visual Studio 2003中的应用程序无需输入参数字段值。

p.s : when i compile application in visual studio 2003 no need to enter parameter field values.

推荐答案

根据我对刷新CRV的理解清除参数值并再次询问值。

To my understanding on refresh CRV clears parameter values and asks for values again.

FrmReport.CrystalReportViewer1.Refresh()

FrmReport.CrystalReportViewer1.Refresh()

FrmReport.CrystalReportViewer1.DisplayGroupTree = False '隐藏下钻部分

FrmReport.CrystalReportViewer1.DisplayGroupTree = False 'hide the drilldown section


这篇关于将早期版本的crystal报告导入visual studio 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 23:02