Hi,

I am trying to use reporting services in a asp.net application (vb.net).

I am trying to render reports programmatically (using ReportViewer which is included in the samples folder of Sql Reporting).

How do i pass a dynamic query which a user selects to the report? I have checked Wrox 'SQL Server Reporting Services' which lists the following SQL URL Parameters - i.e.

rs (for rendering)
rc (for report output format)


Below is my code:



Private Sub cmdTicketsLogged_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTicketsLogged.Click


Dim strCriteria As String
Dim dadTitles As SqlClient.SqlDataAdapter
Dim dstTitles As DataSet
Dim conHelpdeskCL As SqlClient.SqlConnection
Dim MyConnection As New classMisc



conHelpdeskCL = MyConnection.connectionHelpdesk


strCriteria = "set dateformat dmy SELECT DISTINCT DateIn, COUNT(DateIn) As Total " & _
"From helpdesk_info " & _
"WHERE [DateIn] >= '1/1/2004' AND [DateIn] <= '1/1/2005'" & _
" GROUP BY DateIn"



dadTitles = New SqlClient.SqlDataAdapter(strCriteria, conHelpdeskCL)
dstTitles = New DataSet
dadTitles.Fill(dstTitles)


End Sub






Essentially what I trying to do is (like you would do this in Active Reports) declare a report as a variable and then pass the query as a datasource etc


Eg,

Dim arvReport As new ActiveReport1

arvReport.Datasource=



How do i go about this in Reporting services.

Please help,

Rgs,
Mehul