or
ReportProcessor reportProcessor = new ReportProcessor(); RenderingResult result = reportProcessor.RenderReport(type, (IReportDocument)report, null);
Private
Function
BuildParamList(
ByVal
paramType
As
String
)
As
String
Dim
list
As
String
=
""
Dim
count
As
Integer
= 0
For
Each
val
As
Integer
In
CType
(
Me
.ReportParameters(paramType).Value(), Array)
If
count = 0
Then
list = val.ToString
Else
list = list +
","
+ val.ToString()
End
If
count = count + 1
Next
Return
list
End
Function
Private
Sub
AppDetailByRole_NeedDataSource(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.NeedDataSource
'retrieve the data into the dataset
Try
Me
.UsP_AppDetailByRoleContextTableAdapter1.Fill(
Me
.DataSet21.USP_AppDetailByRoleContext, _
BuildParamList(
"Application"
), _
BuildParamList(
"Environment"
), _
BuildParamList(
"Role"
))
TryCast(sender, Telerik.Reporting.Processing.Report).DataSource =
Me
.DataSet21.USP_AppDetailByRoleContext
Catch
ex
As
System.Exception
'An error has occurred while filling the data set. Please check the exception for more information.
System.Diagnostics.Debug.WriteLine(ex.Message)
End
Try
End
Sub