or
| 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
| Private Sub moduleIDGroupHeader_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles moduleIDGroupHeader.ItemDataBound |
| Dim Group As Telerik.Reporting.Processing.GroupSection = DirectCast(sender, Telerik.Reporting.Processing.GroupSection) |
| Dim txtTitle As Telerik.Reporting.Processing.TextBox = DirectCast(Group.ChildElements.Find("txtDMTitle", True)(0), Telerik.Reporting.Processing.TextBox) |
| Dim txtDescription As Telerik.Reporting.Processing.TextBox = DirectCast(Group.ChildElements.Find("txtDMDescription", True)(0), Telerik.Reporting.Processing.TextBox) |
| Try |
| ' Dim row As System.Data.DataRow = DirectCast(Group.DataObject.RawData, System.Data.DataRow) |
| Dim row As System.Data.DataRow = DirectCast(Group.DataObject.RawData, System.Data.DataRow) |
| txtDescription.Visible = row("DMPDescription") |
| txtTitle.Visible = row("DMPTitle") |
| txtTitle.Style.Color = System.Drawing.Color.FromArgb(28, 51, 97) |
| Catch ex As Exception |
| Stop |
| End Try |