Okay I've watched this video about parameterized queries.
I created my sqldataadapter with the following select:
SELECT ApplicationDisplay, RoleDisplay, FirstName, LastName, EffectiveStartDate, EffectiveEndDate, EnvironmentDisplay, ApplicationId
FROM AppUsersByRoleView
where applicationid in (@appId)
I want to use the built-in report parameters in telerik reporting. I created a report parameter named "Application" with a type of Integer. (I've also tried a type of string). It is a MultiValue parameter with the available values valuemembers being integers. I also setup the filter to be =Fields.ApplicationId In =Parameters.Application.
Within my codebehind for NeedDataSource I have the following code.
'Transfer the ReportParameter value to the parameter of the select command
Me.SqlDataAdapter1.SelectCommand.Parameters("@appID").Value = Me.ReportParameters("Application").Value
'Take the Telerik.Reporting.Processing.Report instance and set the adapter as
'it's DataSource
Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)
report.DataSource = Me.SqlDataAdapter1
When I run the report, NeedDataSource runs fine, but then I get an error within my reportviewer.
An error has occured while processing Report '':
Failed to convert parameter value from a ArrayList to a Int32.
Any help would be appreciated.
Thanks.
I created my sqldataadapter with the following select:
SELECT ApplicationDisplay, RoleDisplay, FirstName, LastName, EffectiveStartDate, EffectiveEndDate, EnvironmentDisplay, ApplicationId
FROM AppUsersByRoleView
where applicationid in (@appId)
I want to use the built-in report parameters in telerik reporting. I created a report parameter named "Application" with a type of Integer. (I've also tried a type of string). It is a MultiValue parameter with the available values valuemembers being integers. I also setup the filter to be =Fields.ApplicationId In =Parameters.Application.
Within my codebehind for NeedDataSource I have the following code.
'Transfer the ReportParameter value to the parameter of the select command
Me.SqlDataAdapter1.SelectCommand.Parameters("@appID").Value = Me.ReportParameters("Application").Value
'Take the Telerik.Reporting.Processing.Report instance and set the adapter as
'it's DataSource
Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)
report.DataSource = Me.SqlDataAdapter1
When I run the report, NeedDataSource runs fine, but then I get an error within my reportviewer.
An error has occured while processing Report '':
Failed to convert parameter value from a ArrayList to a Int32.
Any help would be appreciated.
Thanks.