Hi,
I'm running on ASP.NET 4 , I just upgraded my report-viewer from 9.0 to 10.0 .
Everything still works fine on my local PC, but when I upload it to the server, i can't see the report, no error is shown. I'm not sure where the problem is hiding.
This is my code :
d Code:
For Each row As GridViewRow In GridView1.Rows ' Access the CheckBox
Dim cb As CheckBox = row.FindControl("CheckBox2")
If cb IsNot Nothing AndAlso cb.Checked Then
ReportViewer1.Visible = True
atLeastOneRowDeleted = True ' First, get the ProductID for the selected row
Dim ID As Integer = (GridView1.DataKeys(row.RowIndex).Value) ' "" the row
bb &= String.Format("{0},", ID)
End If
Next ' Show the Label if at least one row
actionsDropDownList.Text = ""
ReportViewer1.Reset()
ReportViewer1.ProcessingMode = ProcessingMode.Local
Dim rep As LocalReport = ReportViewer1.LocalReport
rep.ReportPath = "invoice.rdlc"
Dim ds As DataSet = GetSalesData("InvoiceData")
'Create a report data source for the sales order data
Dim dsSalesOrder As New ReportDataSource()
dsSalesOrder.Name = "InvoiceData_invoice"
dsSalesOrder.Value = ds.Tables("InvoiceData")
'+++++++++++++++++++++++++++++++++++++++++++++ Send Parameter +++++++++++++++++++++++++++++
Dim params(0) As Microsoft.Reporting.WebForms.ReportParameter
Dim p As Microsoft.Reporting.WebForms.ReportParameter
p = New Microsoft.Reporting.WebForms.ReportParameter("searchcriteria", searchcriteria.Text)
params(0) = p
ReportViewer1.LocalReport.SetParameters(params)
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
rep.DataSources.Add(dsSalesOrder)
tt Code:
Private Function GetSalesData(ByVal sourcetable As String)
Dim len As Integer
Dim bbc As String
len = bb.Length
bbc = bb.Remove(len - 1, 1)
Dim ds As New DataSet
Dim sqlSalesData As String = "SELECT * FROM xxxxxxx where ID in(" & bbc & " ) order by datee"
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("xxxxxx").ToString)
Dim command As New SqlCommand(sqlSalesData, connection)
Dim salesOrderAdapter As New SqlDataAdapter(command)
salesOrderAdapter.Fill(ds, sourcetable)
salesOrderAdapter.Dispose()
command.Dispose()
End Using
Return ds
End Function
thanks