Q1 2014 silverlight
I am using the ObjectDataSource with a business object with this signature:
Public Class TransferReportClass
<DataObjectMethod(DataObjectMethodType.Select)> _
Public Function TransferReportList(ByVal sn As String, _
ByVal transferBy As Integer, _
ByVal sortBy As Short, _
ByVal allDates As Boolean, _
ByVal FromDate As Date, _
ByVal ToDate As Date, _
ByVal direction As Short) As List(Of DataTransfer)
If I initialize the parameters in the configure data source wizard the report runs fine.
However I want to pass the paramenters at run time so in RenderBegin I do this:
args.ParameterValues("sn") = Application.Current.Resources("sn")
args.ParameterValues("transferBy") = rp.transferBy
args.ParameterValues("sortBy") = rp.sortBy
args.ParameterValues("allDates") = rp.allDates
args.ParameterValues("FromDate") = rp.FromDate
args.ParameterValues("ToDate") = rp.ToDate
args.ParameterValues("direction") = rp.direction
When I was rusing a data method that returned a dataset instead of a list as above the report worked fine.
I changed it to return a list of my data bojects becuase I need to do some formating and the class already
handles everything.
when I run the report now I get the following error:
An error has occured while processing Report 'TransferReport':
An error has occured while resolving ObjectDataSource1 data source: cannot convert to type System.Int32
It must be talking about the parameters, so I modified the methods signature in an attempt to appeaise it,
I changed Interger to Int32, Shoert to Int16, and Date to Datetime, with no effect.
I am using the ObjectDataSource with a business object with this signature:
Public Class TransferReportClass
<DataObjectMethod(DataObjectMethodType.Select)> _
Public Function TransferReportList(ByVal sn As String, _
ByVal transferBy As Integer, _
ByVal sortBy As Short, _
ByVal allDates As Boolean, _
ByVal FromDate As Date, _
ByVal ToDate As Date, _
ByVal direction As Short) As List(Of DataTransfer)
If I initialize the parameters in the configure data source wizard the report runs fine.
However I want to pass the paramenters at run time so in RenderBegin I do this:
args.ParameterValues("sn") = Application.Current.Resources("sn")
args.ParameterValues("transferBy") = rp.transferBy
args.ParameterValues("sortBy") = rp.sortBy
args.ParameterValues("allDates") = rp.allDates
args.ParameterValues("FromDate") = rp.FromDate
args.ParameterValues("ToDate") = rp.ToDate
args.ParameterValues("direction") = rp.direction
When I was rusing a data method that returned a dataset instead of a list as above the report worked fine.
I changed it to return a list of my data bojects becuase I need to do some formating and the class already
handles everything.
when I run the report now I get the following error:
An error has occured while processing Report 'TransferReport':
An error has occured while resolving ObjectDataSource1 data source: cannot convert to type System.Int32
It must be talking about the parameters, so I modified the methods signature in an attempt to appeaise it,
I changed Interger to Int32, Shoert to Int16, and Date to Datetime, with no effect.