B
Barry Gilbert
Hi,
I'm working with the drill-down report from the Reports starter kit.
I've gotten stuck on the 2nd-level datalist. When I drill-down to this
level, the datasource function call is firing and my dataset is getting
populated from the db correctly, but nothing is displayed in the
datalist. Am I missing something about the datalist config? Here's a
snip:
<asp:datalist BorderWidth="3" id="BatchDetail" runat="server"
DataSource='<%# GetBatchDetail(DataBinder.Eval(Container.DataItem,
"Batch")) %>' RepeatDirection="Vertical" repeatcolumns="1" Width="100%"
CellPadding="0" cellspacing="0" OnItemCommand="BatchDetail_ItemCommand"
BorderColor="#ff0033" Visible="true">
Protected Sub BatchDetail_ItemCommand(ByVal Sender As Object, ByVal e As
DataListCommandEventArgs)
Dim cmd As String = CType(e.CommandSource, LinkButton).CommandName
Dim senderlist As DataList = CType(Sender, DataList)
If cmd = "select" Then
senderlist.SelectedIndex = e.Item.ItemIndex
End If
senderlist.DataSource = GetBatchDetail(CStr(ViewState(_batch)))
senderlist.DataBind()
End Sub
Protected Function GetBatchDetail(ByVal batch As Int32) As
TechStyle.Reports.Components.DrillDownReportCollection
Return Reports.Components.DrillDownReport.GetBatchDetail(batch)
End Function
I'm working with the drill-down report from the Reports starter kit.
I've gotten stuck on the 2nd-level datalist. When I drill-down to this
level, the datasource function call is firing and my dataset is getting
populated from the db correctly, but nothing is displayed in the
datalist. Am I missing something about the datalist config? Here's a
snip:
<asp:datalist BorderWidth="3" id="BatchDetail" runat="server"
DataSource='<%# GetBatchDetail(DataBinder.Eval(Container.DataItem,
"Batch")) %>' RepeatDirection="Vertical" repeatcolumns="1" Width="100%"
CellPadding="0" cellspacing="0" OnItemCommand="BatchDetail_ItemCommand"
BorderColor="#ff0033" Visible="true">
Protected Sub BatchDetail_ItemCommand(ByVal Sender As Object, ByVal e As
DataListCommandEventArgs)
Dim cmd As String = CType(e.CommandSource, LinkButton).CommandName
Dim senderlist As DataList = CType(Sender, DataList)
If cmd = "select" Then
senderlist.SelectedIndex = e.Item.ItemIndex
End If
senderlist.DataSource = GetBatchDetail(CStr(ViewState(_batch)))
senderlist.DataBind()
End Sub
Protected Function GetBatchDetail(ByVal batch As Int32) As
TechStyle.Reports.Components.DrillDownReportCollection
Return Reports.Components.DrillDownReport.GetBatchDetail(batch)
End Function