or
object
[] param1 =
new
object
[MyCollection.Count];
object
[] param2 =
new
object
[MyCollection.Count];
int
loopCounter = 0;
foreach
(Widget myWidget
in
MyCollection)
{
param1[loopCounter] = myWidget.param1;
param2[loopCounter] = myWidget.param2;
loopCounter++;
}
args.ParameterValues[
"Param1"
] = param1;
args.ParameterValues[
"Param2"
] = param2;
Telerik.Reporting.Processing.Report myReport = (Telerik.Reporting.Processing.Report)sender;
System.Collections.Generic.List<ReportItem> reportItems =
new
System.Collections.Generic.List<ReportItem>();
object
[] param1Array = (
object
[])myReport.Parameters[
"Param1"
].Value;
object
[] param2Array = (
object
[])myReport.Parameters[
"Param2"
].Value;
for
(
int
loopCounter = 0; loopCounter < param1Array.Length; loopCounter++)
{
ReportItem ri =
new
ReportItem();
ri.param1 = param1Array[loopCounter].ToString();
ri.param2 = param2Array[loopCounter].ToString();
}
this
.DataSource = reportItems;
public
ShowMyReport()
{
InitializeComponent();
}
private
void
ChildWindow_Loaded(
object
sender, RoutedEventArgs e)
{
MyViewModel vm = (MyViewModel)
this
.DataContext;
vm.RefreshReport +=
new
System.Action(vm_RefreshReport);
ReportViewer1.RenderBegin += vm.OnBlahRenderBeginCommand;
// This points to the RenderBegin event I talked about above
vm.UpdateReport();
}
void
vm_RefreshReport()
{
((ReportViewerModel)
this
.ReportViewer1.DataContext).RefreshReportCommand.Execute(
null
);
}
*** ReportProcessor.Render STARTED ***
*** ReportProcessor.GetRenderer STARTED ***
*** ReportProcessor.GetRenderer DONE in 00:00:00.0000277 ***
*** ProcessReport #0 STARTED ***
The thread '<
No
Name>' (0x25ac) has exited with code 0 (0x0).
The thread '<
No
Name>' (0x1a90) has exited with code 0 (0x0).
The thread '<
No
Name>' (0x1534) has exited with code 0 (0x0).
*** Report Processing STARTED ***
*** Report Processing DONE in 00:00:00.3108771 ***
*** Measure Report (Horizontal) STARTED ***
*** Measure Report (Horizontal) DONE in 00:00:00.0361700 ***
*** Measure Report (Vertical) STARTED ***
*** Measure Report (Vertical) DONE in 00:00:00.4248685 ***
*** ProcessReport #0 DONE in 00:00:58.5183698 ***
*** RenderReport #0 STARTED ***
'iexplore.exe' (Silverlight): Loaded 'C:\Program Files\Microsoft Silverlight\4.0.50826.0\en-US\System.ServiceModel.debug.resources.dll'
*** RenderReport #0 DONE in 00:00:13.2401077 ***
*** ReportProcessor.Render DONE in 00:01:12.1509348 ***
The thread '<
No
Name>' (0xc08) has exited with code 0 (0x0).