thanks but this problem not solved i created a replort with vb.net and i converted the code and got this code:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports Microsoft.ApplicationBlocks.Data
Imports Microsoft.Reporting.WebForms
Partial Public Class Report
Inherits System.Web.UI.Page
Public thisConnectionString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString
Public SearchValue As SqlParameter() = New SqlParameter(0) {}
Protected Sub RunReportButton_Click(ByVal sender As Object, ByVal e As EventArgs)
ReportViewer1.Visible = True
Dim thisConnection As New SqlConnection(thisConnectionString)
Dim thisDataSet As New System.Data.DataSet()
SearchValue(0) = New SqlParameter("@CategoryName", DropDownList1.SelectedValue)
thisDataSet = SqlHelper.ExecuteDataset(thisConnection, "ShowProductByCategory", SearchValue)
Dim datasource As New ReportDataSource("DataSetProducts_ShowProductByCategory", thisDataSet.Tables(0))
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(datasource)
If thisDataSet.Tables(0).Rows.Count = 0 Then
lblMessage.Text = "Sorry, no products under this category!"
End If
ReportViewer1.LocalReport.Refresh()
End Sub
End Class
and also exist 2 errors :
1- error in namespace:Imports Microsoft.ApplicationBlocks.Data
2- error in sqlhelper(sqlhelper not define) any help please ?