We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

How to design header/details/Footer in report

Hi

How to design header,details, and footer in report and barcodecode also need to show at header

   private void LoadReport()

        {

 

            List<ReportDataSource> rptDatasources = new List<ReportDataSource>();

 

            ReportDataSource rptDatasource1 = new ReportDataSource();

            rptDatasource1.Name = "DataSet1";

            rptDatasource1.Value = bindstudent();

            rptDatasources.Add(rptDatasource1);

 

            ReportDataSource rptDatasource2 = new ReportDataSource();

            rptDatasource2.Name = "DataSet2";

            rptDatasource2.Value = headerrpt();

            rptDatasources.Add(rptDatasource2);

 

          

 

            this.ReportViewer1.DataSources = rptDatasources;

            this.ReportViewer1.ReportServiceUrl = VirtualPathUtility.ToAbsolute("~/api/RDLCReport");

 

        }





 

    

        // header report

        private List<divisions> headerrpt()

        {

 

            List<divisions> division = new List<divisions>();

 

            division.Add(new divisions { year = "2015", date = DateTime.Parse("05/05/2015"), barcodecode = "00007" });

 

 

            return division;

 

        }

 

 

        [Serializable]

 

        class divisions

        {

 

            public string year;

 

            public DateTime date;

 

            public string barcodecode ;

 

        }

 

 

 

 

 

 

 

// Details Report

 

        private List<Students> bindstudent()

        {

 

            List<Students> stud = new List<Students>();

 

            stud.Add(new Students { name = "basil", studentID = "100001", address = "25,st.charles st" });

 

            stud.Add(new Students { name = "sam", studentID = "10002", address = "33,wellow st" });

 

            stud.Add(new Students { name = "rosee", studentID = "100003", address = "31,Feter st" });

 

            return stud;

 

        }

 

 

        [Serializable]

 

        class Students

        {

 

            public string name;

 

            public string studentID;

 

            public string address;

        }

 

 

Thanks

Pratheep



Attachment: report_d0ed0766.rar

1 Reply

YD Yuvaraj Devarajan Syncfusion Team October 20, 2016 12:39 PM UTC

Hi Pratheep, 
 
Thanks for contacting Syncfusion support. 

How to design header,details, and footer in report 
We can add the header and footer in Report design surface area itself by right clicking the report surface and choose the insert option and select the page header or page footer option. Then we can add the Report Items in page header and footer surface by right clicking the page header and footer surface and choose the insert option and add the Report items.   
 
Please refer to the below MSDN documentation for more detail, 

 barcodecode also need to show at header 
We have generated the barcode using our “Syncfusion.Pdf.Base” assembly with code modules and pass/set the generated barcode base64string to image by using field expression (=Code.Convert("ABCD 12345")).   

Code Modules: 
 

Reference to Assemblies and classes. 
 

We have prepared the sample and it can be downloaded from below location, 
 
Note: In your shared sample, you have not added the WebAPI restful service to process the report. In ReportViewer control, the report is processed in server side using WebAPI controller. So, add the WebAPI restful service and config the WebAPI controller in global.asax file.   
 
Please refer to the below UG documentation link to create the sample in ASP.NET web platform, 

You can obtain the ASP.Net ReportViewer samples from the below build installed location,   
%userprofile%\AppData\Local\Syncfusion\EssentialStudio\version\Web\Samples\Web   


Regards, 
Yuvaraj D. 


Loader.
Live Chat Icon For mobile
Up arrow icon