public
int _filteredCount = 0;
private void textBox1_ItemDataBinding(object sender, EventArgs e)
{
_filteredCount += 1;
}
The intent here is to count how many rows will be added based on the filter. This seems to work fine and _filteredCount is set correctly based on the data that I supply to it.
In SummaryCategoryMaster, I have added the following event handler:
private void astCatDetailSubreport_ItemDataBound(object sender, EventArgs e)
{
SummaryCategoryDetail detailReport = (SummaryCategoryDetail)this.astCatDetailSubreport.ReportSource;
if (detailReport != null)
{
this.Visible = detailReport._filteredCount > 0;
detailReport._filteredCount = 0;
}
}
The intent is for the SummaryCategoryMaster subreport to not display if it's subreport has no data. When I run the code and display the report in a ReportViewer on a WinForm, however, the SummaryCategoryMaster appears no matter what the value to this.Visible is set to. When I save the generated report as a PDF, however, the SummaryCategoryMaster does not appear. I'm using the 430 version of 2009.
What am I doing wrong and is there a better way for me to do this?
Thanks in advance.
private void chart1_NeedDataSource(object sender, EventArgs e) |
{ |
Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart; |
chart.DataSource = this.richPlayDBDataSetTableAdapter1.GetData(Convert.ToString(chart.Report.Parameters["SSN"])); |
DataRowView row = (DataRowView)chart.DataItem; |
Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)chart.ItemDefinition; |
defChart.Series[0].DefaultLabelValue = string.Format("{0} #%", row["Fund"]); |
} |