Change Column Name of Report Header From Code behind Crystal Report using C# RRS feed

  • Question

  • User768750088 posted

    Hi All,

     I m new to Crystal Reports.., I am facing BigIssue (for me), how to Change Column Names of Headers,

    I was Design Database(*.xsd), with Six Columns, i have Arranged, them on (.rpt) file. and in Page_load event of .aspx, were  Reportviewer is located, i have written a following Code.

    But i am unable to view the Result in Report. 

      SqlConnection connection = new SqlConnection(ConfigurationManager.AppSettings["dbconn"].ToString());
                SqlCommand command = new SqlCommand("select EmployeeCode,FirstName,LastName, DOB,BloodGroup,Address1 from  Hr_EmpTable", connection);
                SqlDataAdapter adapter = new SqlDataAdapter(command); 
                DataSet dataset = new DataSet();
                adapter.Fill(dataset, "EmpTable");         
                Session["report"] = CustomerReport;
                empcrystalviewer.ReportSource = CustomerReport;

    -- my Intent is as How many Columns are Coming from dataset like "

    EmployeeCode,FirstName,LastName, DOB,BloodGroup,Address1

    I  want that report sholud show in Header column and Respected data  as in Dataset.

    please give suggetion and or Sample Code..

    It will be higly appriciate..

    Thanks in Advance..

    Friday, September 13, 2013 2:48 AM