Thursday, June 6, 2013

No column header when exporting to CSV from Telerik Report

Check the config file. Make sure that the NoHeader attribute is set to "false"
<Telerik.Reporting>
<Extensions>
<Render>
<Extension name="CSV">
<Parameters>
<Parameter name="NoHeader" value="false"/>
<Parameter name="NoStaticText" value="true"/>
</Parameters>
</Extension>
</Render>
</Extensions>
</Telerik.Reporting>


What if you see the textboxes names and you don't want it of course?

namespace ClassLibrary3
{
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;

    /// <summary>
    /// Summary description for Report1.
    /// </summary>
    public partial class Report1 : Telerik.Reporting.Report
    {
        public Report1()
        {
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            this.textBox1.Name = "Text Box 1";
            this.textBox2.Name = "Text Box 2";
            this.textBox3.Name = "Text-Box-3";

        }
    }
}


Set the textboxes names according to your desired column header names.

No comments:

Post a Comment