I was wondering is there a way to interact with the data in the datasource from the report code? For instance, if I import the System.Data.Sql and System.Data.SqlClient namespaces in the report code, then in an event of the report or component, I declare a datareader or sqlCommand and then write the code similar to this:
Code: Select all
Dim sql As String
Dim cmd As New SqlCommand(reportDataSource)
Dim dr As New SqlDataReader
sql = "SELECT * FROM reportDataSource WHERE ID_Field = variable"
cmd.CommandText = sql
dr = cmd.ExecuteReader
'Some code to check the values
dr.Close
Thanks!
Ivan