Print multiple items consecutively using the same code

1 posts, 0 answers
  1. Samuel
    Samuel avatar
    1 posts
    Member since:
    Aug 2018

    Posted 22 Aug 2018 Link to this post

    Hi,

     

    I looked around but could not find a solution

     

    This is what we have but when we have multiple header items in dsHeader.

    I wish it prints out different header data at once. the code below shows and prints only the first header and its body

    What I would like to do is print out multiple data consecutively when dsHeader's length is more than one using the same code

    odsHeader is object header source provided by Telerik Reporting R1 2017

     

    namespace DMG.MRP.Report.Design
    {
        using System;
        using System.ComponentModel;
        using System.Drawing;
        using System.Windows.Forms;
        using Telerik.Reporting;
        using Telerik.Reporting.Drawing;
        using System.Data;

        using DMG.RPT.Biz;

        /// <summary>
        /// Summary description for RPT_PO.
        /// </summary>
        public partial class RPT_PO : Telerik.Reporting.Report
        {
            public RPT_PO()
            {
                InitializeComponent();
            }

            public void LoadDataReport(string po_no)
            {
                if (po_no == null)
                {
                    return;
                }

                DataSet dsHeader = null, dsDetail = null;
                using (RPT_Biz biz = new RPT_Biz())
                {
                    dsHeader = biz.GetHeader_PO(po_no);
                    odsHeader.DataSource = dsHeader;
                    odsHeader.DataMember = "Table";

                    dsDetail = biz.GetDetail_PO(po_no);
                    odsHeader.DataSource = dsDetail;
                    odsHeader.DataMember = "Table";
                }

                this.DataSource = dsHeader.Tables["Table"];
                table1.DataSource = dsDetail.Tables["Table"];
            }
        }
    }

     

Back to Top