Alright I have a project where I load a database table into a DataSet and DataAdapter using SQLClient.SqlConnection. I am using this to create reports and I am trying to add dynamic filters to the report ( Only view certain items, select by name, things like that ). Now, currently I have to use a whole new query and grab that from the database every time I change the output specifications. Is there a way I can skip going through the database and just Query the original DataSet that I have created ?
Thanks for your help..Code:Dim oConn As SqlClient.SqlConnection = New SqlClient.SqlConnection(cString) Dim tAdap As SqlClient.SqlDataAdapter Dim sQuery As String = "SELECT * FROM ReportView" Dim dSet As DataSet ' Code in here that adds to the query when specific items are selected ' ex. WHERE fieldA = 1 AND name = 'Nick' tAdap = New SqlClient.SqlDataAdapter(sQuery, oConn) dSet = New DataSet() tAdap.Fill(dSet, table) ' Using the DevExpress Framework (.repx is a report file) rep = XtraReport.FromFile("reportView.repx", True) rep.DataSource = dSet rep.DataAdapter = tAdap rep.DataMember = table




Reply With Quote