Hello,
I would like to know if it's possible to hide entire DataBand or table object when exporting to CSV format. Maybe by using tag??
Thanks in advance.
Niko
Hide DataBand or Table when export to CSV
Re: Hide DataBand or Table when export to CSV
Hello,
As a way, you can use the additional code in the Exporting event of the report for disabling necessary component.
For example:
Thank you.
As a way, you can use the additional code in the Exporting event of the report for disabling necessary component.
For example:
Code: Select all
DataBand1.Enabled = false;
this.Render(false);
Re: Hide DataBand or Table when export to CSV
Hello Aleksey,
Thank you for your help. Works fine! I create a generic method for all my reports with this.
If anyone needs (my main table is called 'Table'):
Thank you for your help. Works fine! I create a generic method for all my reports with this.
If anyone needs (my main table is called 'Table'):
Code: Select all
/// <summary>
/// This method can be used before Render() to prepare report for CSV export. All components except 'Table' is disabled.
/// </summary>
public void PrepareForCsvExport()
{
StiComponentsCollection stiColl = _stiReport.GetComponents();
foreach( StiComponent comp in stiColl )
{
if( comp.ToolboxCategory == StiToolboxCategory.Bands )
{
if( comp.Name != "Table" ) comp.Enabled = false;
}
}
}
Re: Hide DataBand or Table when export to CSV
Hello
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.