Hi,
i have subreport with datasource containt collection of objects. (So components replicate here). Among other i have panel with 2 tables whitch i want to hide if both tables are empty. Tables is fulfilling by binding datasource: ReportItem.DataObject.nameOfMySubClassCollectionInMainDataSource and its working fine. I try hiding the panel by parameters with conditional formating or manualy in code. But problem is that myTable.DataSource property is always null event in DataBound event. Of course after report starting table contains right data but in code i can't check it. Please help.
here is code, where debuger reports always null value:
Thanks,
Tomas Linhart, CZ
i have subreport with datasource containt collection of objects. (So components replicate here). Among other i have panel with 2 tables whitch i want to hide if both tables are empty. Tables is fulfilling by binding datasource: ReportItem.DataObject.nameOfMySubClassCollectionInMainDataSource and its working fine. I try hiding the panel by parameters with conditional formating or manualy in code. But problem is that myTable.DataSource property is always null event in DataBound event. Of course after report starting table contains right data but in code i can't check it. Please help.
here is code, where debuger reports always null value:
private
void
manPrechodZTable_ItemDataBound(
object
sender, EventArgs e)
{
if
((manPrechodZTable.DataSource ==
null
|| (manPrechodZTable.DataSource
as
ExC_BodTrasy.ExC_Prechod[]).Length == 0))
{
this
.ReportParameters[1].Value =
true
;
}
else
{
this
.ReportParameters[1].Value =
false
;
}
}
Thanks,
Tomas Linhart, CZ