Hi,
I am trying to use an updated datasource to be use in my crystal report. The crystal report datasource is vwMyView. I want to amend the contents of vwMyView and use the updated datasource to be used in the crystal report. How can I do this and what would the syntax be or is there a better way of doing this. Below is my code, what should I add. Help
Public sub PossibleEmployeeSalary
Dim adoCmd As New SqlClient.SqlCommand
Dim adoRdr As SqlDataReader
Dim cryRpt As New ReportDocument
cryRpt.Load("C:\TEMP\REPORT1.RPT")
Try
adoCmd.Connection = adoConn
adoCmd.CommandType = CommandType.Text
adoCmd.CommandText = "SELECT * FROM vwMyView"
adoCmd.ExecuteReader()
While adoRdr.Read()
adoRdr("Salary") = adoRdr("Salary") * 0.05
adoRdr("Surname") = adoRdr("Surname")
End While
CrystalReportViewer1.Zoom(1)
CrystalReportViewer1.Refresh()
Catch ex As Exception
End Try
End Sub