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

Print multiple items consecutively using the same code

0 Answers 15 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Samuel
Top achievements
Rank 1
Samuel asked on 22 Aug 2018, 02:53 PM

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"];
        }
    }
}

 

No answers yet. Maybe you can help?

Tags
Report Designer (standalone)
Asked by
Samuel
Top achievements
Rank 1
Share this question
or