I have a report where someone could pass in a parameter to show "Detail" for the record. The "detail" is tied to a second within the Telerik Report. I am unsure of how to get it to fire and show as it should. I have added the primary and displays the records in the group header.
Attached is an image of what my report looks like SQLDatasource1 is the primary and uses parameters passed in to display. If input parameter DetailFlag = true then I want to show the Detail Record which is tied to SQLDataSource2.
Tried the following in the code-behind but not displaying.
Private
Sub
detail_ItemDataBound(sender
As
Object
, e
As
EventArgs)
Handles
detail.ItemDataBound
Dim
section
As
Processing.ReportSection = TryCast(sender, Processing.ReportSection)
If
section.Report.Parameters(
"DetailFlag"
).Value =
"True"
Then
Table1.Visible =
True
Else
Table1.Visible =
False
End
If
section.Style.BackgroundColor = groupHeaderSection.Style.BackgroundColor
End
Sub
Private
Sub
pageHeaderSection1_ItemDataBound(sender
As
Object
, e
As
EventArgs)
Handles
pageHeaderSection1.ItemDataBound
Dim
section
As
Telerik.Reporting.Processing.PageSection = TryCast(sender, Processing.PageSection)
Dim
txtAsOf
As
Processing.TextBox =
DirectCast
(Processing.ElementTreeHelper.GetChildByName(section,
"txtAsOf"
), Processing.TextBox)
Dim
txtReportParam
As
Processing.TextBox =
DirectCast
(Processing.ElementTreeHelper.GetChildByName(section,
"txtReportParam"
), Processing.TextBox)
txtAsOf.Value =
"AS OF "
& Today.ToString(
"MM/dd/yyyy"
)
txtReportParam.Value =
"FOR "
& section.Report.Parameters(
"Area"
).Value.ToString &
" - "
& section.Report.Parameters(
"Status"
).Value.ToString
End
Sub