This is a migrated thread and some comments may be shown as answers.

Hide Report Header at runtime

3 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 17 Feb 2011, 06:20 PM
I'd like to hide the report header at runtime. I've found the property to set visible false, but not sure how to add this to the report .
  
Telerik.Reporting.ReportHeaderSection reportHeader = new Telerik.Reporting.ReportHeaderSection();
            reportHeader.Visible = false;

Thanks, all help is appreciated.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Feb 2011, 10:49 AM
Hi Tim,

We are not sure about your exact scenario. Still check out the following code snippet, that shows how to hide a report header section prior to setting the ReportViewer.Report property in Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
    var report1 = new Report1();
    var reportHeader = (report1.Items.Find("reportHeaderSection1", true)[0] as Telerik.Reporting.ReportHeaderSection);
    reportHeader.Visible = false;
    ReportViewer1.Report = report1;
}

Give it a try and if you need additional assistance we will appreciate if you further elaborate on your scenario.

Regards,
Peter
the Telerik team
0
ToddR
Top achievements
Rank 1
answered on 21 Mar 2013, 03:43 PM
This worked for my reports developed in visual studio, how do you hide the report header at runtime with a .trdx report developed with the Report Designer?
thanks
0
Peter
Telerik team
answered on 21 Mar 2013, 04:30 PM
Hello,

You can conditionally alter items visibility with Bindings and Conditional Formatting that utilize user functions and expressions.

All the best,
Peter
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
Tim
Top achievements
Rank 1
Answers by
Peter
Telerik team
ToddR
Top achievements
Rank 1
Share this question
or