or
| <UserControl xmlns:my="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight" x:Class="Silverlight_Report_Viewer.MainPage" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| mc:Ignorable="d" |
| d:DesignHeight="300" d:DesignWidth="400"> |
| <Grid x:Name="LayoutRoot" Background="White"> |
| <my:ReportViewer Margin="0,0,0,0" Width="Auto" Height="Auto" Report="Reports.Report1, Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" ReportServerUri="../ReportService.svc" /> |
| </Grid> |
| </UserControl> |
| Public Sub New(ByVal strReportName As String, ByVal intReportParam As Integer) |
| InitializeComponent() |
| mstrReportName = strReportName |
| mintReportParam = intReportParam |
| AddHandler Me.ReportViewer1.RenderBegin, AddressOf ReportViewer1_RenderBegin |
| End Sub |
| Private Sub ReportViewer1_RenderBegin(ByVal sender As Object, ByVal args As Telerik.ReportViewer.Silverlight.RenderBeginEventArgs) |
| args.ParameterValues("@TenantsID") = "2" |
| End Sub |
| private void MySubReport_NeedDataSource(object sender, EventArgs e) |
| { |
| Processing.Report report = (Processing.Report)sender; |
| Processing.IDataObject dataObj = (Processing.IDataObject)report.DataObject; |
| MyClass myObj = dataObj.RawData as MyClass; |
| ... |
| } |
In Q1 raw data returns null. Is there a way to cast MyClass or is my access restricted to String s = dataObj["valName"]; ?
Thanks