M
Meena
Hi every Body,
I am using crystalReports 8.5 and vb.Net Could anyone help me to sort
out this problem.I couln't Refresh my report Using code.I am using
ODBC Connection.There is no option for me to change from ODBC.
I have tried to include the below code in my application.But it's not
working for me, its asking a pop up to loging again n even supplied
pwd n username its saying that unable to open.
Please help me out for solving this.Tried many ways n stuck @this
point from past few days.searched this kind of problem in groups but
didn't get a suitable one for me.Early Repliey is greatly appreciated.
:-(
Thank you,
Regards
meena.
'CR Variables
Dim crReportDocument As CrystalReport1
Dim crTableLogOnInfos As TableLogOnInfos
Dim crTableLogOnInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo
'Create an instance of the strongly-typed report object
crReportDocument = New CrystalReport1()
'Setup the connection information structure to be used
'to log onto the datasource for the report.
crConnectionInfo = New ConnectionInfo()
With crConnectionInfo
.ServerName = "xxxx" 'physical server name
.DatabaseName = "Pubs"
.UserID = "sa"
.Password = ""
End With
'Define and set the logon information for the table
crTableLogOnInfo = New TableLogOnInfo()
With crTableLogOnInfo
.ConnectionInfo = crConnectionInfo
.TableName = "authors"
End With
'Pass the table info to a collection of tables.
crTableLogOnInfos = New TableLogOnInfos()
crTableLogOnInfos.Add(crTableLogOnInfo)
'Pass the entire collection of table logon information to the
viewer.
CrystalReportViewer1.LogOnInfo = crTableLogOnInfos
'Set the viewer to the report object to be previewed. This
must be done
'after all the database logon has been set.
CrystalReportViewer1.ReportSource = crReportDocument
I am using crystalReports 8.5 and vb.Net Could anyone help me to sort
out this problem.I couln't Refresh my report Using code.I am using
ODBC Connection.There is no option for me to change from ODBC.
I have tried to include the below code in my application.But it's not
working for me, its asking a pop up to loging again n even supplied
pwd n username its saying that unable to open.
Please help me out for solving this.Tried many ways n stuck @this
point from past few days.searched this kind of problem in groups but
didn't get a suitable one for me.Early Repliey is greatly appreciated.
:-(
Thank you,
Regards
meena.
'CR Variables
Dim crReportDocument As CrystalReport1
Dim crTableLogOnInfos As TableLogOnInfos
Dim crTableLogOnInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo
'Create an instance of the strongly-typed report object
crReportDocument = New CrystalReport1()
'Setup the connection information structure to be used
'to log onto the datasource for the report.
crConnectionInfo = New ConnectionInfo()
With crConnectionInfo
.ServerName = "xxxx" 'physical server name
.DatabaseName = "Pubs"
.UserID = "sa"
.Password = ""
End With
'Define and set the logon information for the table
crTableLogOnInfo = New TableLogOnInfo()
With crTableLogOnInfo
.ConnectionInfo = crConnectionInfo
.TableName = "authors"
End With
'Pass the table info to a collection of tables.
crTableLogOnInfos = New TableLogOnInfos()
crTableLogOnInfos.Add(crTableLogOnInfo)
'Pass the entire collection of table logon information to the
viewer.
CrystalReportViewer1.LogOnInfo = crTableLogOnInfos
'Set the viewer to the report object to be previewed. This
must be done
'after all the database logon has been set.
CrystalReportViewer1.ReportSource = crReportDocument