or
I cant seem to find an example on this site that shows changing an item (ie. TextBox) in a subreport.
I'm trying to update the textbox in the subreport, but it will not show the updated value.
I tried the following code as an example and when I debug and I can see the subreport text box. This example changes the value of all textbox items in the main report but not in the subreport.
ReportItemBase[] allTextBoxes = report.Items.Find(typeof(Telerik.Reporting.TextBox), true); int i = 0; foreach (Telerik.Reporting.TextBox textBox in allTextBoxes) { textBox.Value = (i++).ToString(); }
| Private Sub detail_ItemDataBound(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles detail.ItemDataBound |
| Dim detail As Telerik.Reporting.Processing.DetailSection = DirectCast(sender, Telerik.Reporting.Processing.DetailSection) |
| Dim section As Processing.DetailSection = TryCast(sender, Processing.DetailSection) |
| Dim row As DataRowView = DirectCast(section.DataItem, DataRowView) |
| Dim aPicBox = DirectCast(detail.ChildElements("pnlDetails").ChildElements("pnlPic").ChildElements("picProperty"), Processing.PictureBox) |
| Dim oWebRequest As WebRequest |
| oWebRequest = WebRequest.Create("http://www.geekologie.com/2007/12/07/future-car-1.jpg") |
| aPicBox.Image = System.Drawing.Image.FromStream(oWebRequest.GetResponse.GetResponseStream()) |
| End Sub |