Beispiel #1
0
        public frmDevReport(DataTable dtMain, DataTable dtSub, string ReportMainName, string ReportSubName,
                            string[] FieldSubReport, string[] FieldFormatNumberMain, string[] FieldFormatNumberSub, string WaterMark)
        {
            InitializeComponent();
            rpt         = new XtraReport();
            oBHT_Report = new cBHT_Report();

            oBHT_Report.LoadXtraReport(rpt, ReportMainName, dtMain, Application.StartupPath, FieldFormatNumberMain, "");

            XtraReport rptSub = new XtraReport();

            oBHT_Report.LoadXtraReport(rptSub, ReportSubName, dtSub, Application.StartupPath, FieldFormatNumberSub, "");

            if (FieldSubReport != null)
            {
                foreach (string str in FieldSubReport)
                {
                    XRSubreport xrs = (XRSubreport)rpt.FindControl(str, true);
                    if (xrs != null)
                    {
                        xrs.ReportSource = rptSub;
                    }
                }
            }
            rpt.Watermark.Text           = WaterMark;
            printControl1.PrintingSystem = rpt.PrintingSystem;
            rpt.CreateDocument();
        }
Beispiel #2
0
        public frmDevReport(DataTable dt, string ReportName, string[] FieldFormatNumber, string FormatType, string WaterMark)
        {
            InitializeComponent();
            rpt         = new XtraReport();
            oBHT_Report = new cBHT_Report();

            oBHT_Report.LoadXtraReport(rpt, ReportName, dt, Application.StartupPath, FieldFormatNumber, FormatType);

            rpt.Watermark.Text           = WaterMark;
            printControl1.PrintingSystem = rpt.PrintingSystem;
            rpt.CreateDocument();
        }
Beispiel #3
0
        public frmDevReport(DataTable dt, string ReportName, string[] FieldFormatNumber, string FormatType, string GroupBandName, string GroupFieldName)
        {
            InitializeComponent();
            rpt         = new XtraReport();
            oBHT_Report = new cBHT_Report();

            oBHT_Report.LoadXtraReport(rpt, ReportName, dt, Application.StartupPath, FieldFormatNumber, FormatType);

            GroupHeaderBand groupBand  = (GroupHeaderBand)rpt.Bands[GroupBandName];
            GroupField      groupField = new GroupField(GroupFieldName);

            groupBand.GroupFields.Add(groupField);

            printControl1.PrintingSystem = rpt.PrintingSystem;
            rpt.CreateDocument();
        }