Beispiel #1
0
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            try {
                ReportHelper           _ReportHelper    = new ReportHelper(gcMain, _ProgramID, this.Text);
                CommonReportPortraitA4 reportPortraitA4 = new CommonReportPortraitA4();
                reportPortraitA4.printableComponentContainerMain.PrintableComponent = gcMain;
                reportPortraitA4.IsHandlePersonVisible = false;
                reportPortraitA4.IsManagerVisible      = false;
                _ReportHelper.Create(reportPortraitA4);

                _ReportHelper.Print();

                _ReportHelper = new ReportHelper(gcMainE, _ProgramID, this.Text);
                reportPortraitA4.printableComponentContainerMain.PrintableComponent = gcMainE;
                reportPortraitA4.IsHandlePersonVisible = false;
                reportPortraitA4.IsManagerVisible      = false;
                _ReportHelper.Create(reportPortraitA4);

                _ReportHelper.Print();

                return(ResultStatus.Success);
            }
            catch (Exception ex) {
                WriteLog(ex);
            }
            return(ResultStatus.Fail);
        }
Beispiel #2
0
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            try {
                ReportHelper _ReportHelper = new ReportHelper(gcMain, _ProgramID, this.Text);
                string       datatype      = ddlData.EditValue.AsString();
                if (datatype == "KeyInfo")
                {
                    //重點資料
                    CommonReportPortraitA4 reportPortrait = new CommonReportPortraitA4();//設定為直向列印
                    reportPortrait.printableComponentContainerMain.PrintableComponent = gcMain;
                    reportPortrait.IsHandlePersonVisible = false;
                    reportPortrait.IsManagerVisible      = false;
                    _ReportHelper.Create(reportPortrait);
                }
                else
                {
                    //明細資料,欄位比較多
                    CommonReportLandscapeA3 reportLandscape = new CommonReportLandscapeA3();//設定為橫向列印
                    reportLandscape.printableComponentContainerMain.PrintableComponent = gcMain;
                    reportLandscape.IsHandlePersonVisible = false;
                    reportLandscape.IsManagerVisible      = false;
                    _ReportHelper.Create(reportLandscape);
                }

                _ReportHelper.LeftMemo = labDate.Text + txtSDate.Text; //寫一行標題的註解,通常是查詢條件

                _ReportHelper.Print();                                 //如果有夜盤會特別標註

                return(ResultStatus.Success);
            } catch (Exception ex) {
                WriteLog(ex);
            }
            return(ResultStatus.Fail);
        }
 protected override ResultStatus Print(ReportHelper reportHelper)
 {
     ShowMsg("列印中...");
     try {
         //ShowFormWait();
         CommonReportPortraitA4 reportPortraitA4 = new CommonReportPortraitA4();
         if (_defReport == null)
         {
             _defReport = new defReport();
         }
         XtraReport xtraReport    = reportHelper.CreateCompositeReport(_defReport, reportPortraitA4);
         string     dateCondition = DateText() == "" ? "" : "," + DateText();
         reportHelper.LeftMemo = ConditionText() + dateCondition;
         reportHelper.Create(xtraReport);
         reportHelper.Print(reportHelper.MainReport);
         ShowReport(_defReport);//xtraReport列印後畫面會莫名被清空,所以重新讓它顯示
         //CloseFormWait();
     }
     catch (Exception ex) {
         WriteLog(ex);
         throw ex;
     }
     finally {
         EndExport("列印完成!");
     }
     return(ResultStatus.Success);
 }
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            ShowMsg("列印中...");
            try {
                CommonReportPortraitA4 reportPortraitA4 = new CommonReportPortraitA4();
                if (_defReport == null)
                {
                    _defReport = new defReport();
                }

                _defReport.SetMemoInPageFooter("註:★代表收盤前40秒間詢價");
                XtraReport xtraReport    = reportHelper.CreateCompositeReport(_defReport, reportPortraitA4);
                string     dateCondition = DateText() == "" ? "" : "," + DateText();
                reportHelper.LeftMemo = ConditionText() + dateCondition;
                reportHelper.Create(xtraReport);

                reportHelper.Print(reportHelper.MainReport);
                ShowReport(_defReport);
            }
            catch (Exception ex) {
                WriteLog(ex);
                throw ex;
            }
            finally {
                EndExport("列印完成!");
            }

            return(ResultStatus.Success);
        }
Beispiel #5
0
        public override void ProcessPrintAll(ReportHelper reportHelper)
        {
            CommonReportPortraitA4 report = new CommonReportPortraitA4();

            report.IsHandlePersonVisible = false;
            report.IsManagerVisible      = false;
            reportHelper.Create(report);

            base.Print(reportHelper);
            MessageDisplay.Info(MessageDisplay.MSG_PRINT);
        }
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            _ReportHelper = reportHelper;
            CommonReportPortraitA4 report = new CommonReportPortraitA4();

            report.printableComponentContainerMain.PrintableComponent = gcMain;
            _ReportHelper.Create(report);

            base.Print(_ReportHelper);
            return(ResultStatus.Success);
        }
Beispiel #7
0
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            _ReportHelper = reportHelper;
            CommonReportPortraitA4 report = new CommonReportPortraitA4();

            report.printableComponentContainerMain.PrintableComponent = gcMain;
            _ReportHelper.Create(report);
            //_ReportHelper.LeftMemo = "設定權限給(" + cbxUserId.Text.Trim() + ")";

            base.Print(_ReportHelper);
            return(ResultStatus.Success);
        }
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            _ReportHelper = reportHelper;
            CommonReportPortraitA4 report = new CommonReportPortraitA4();

            _ReportHelper.IsHandlePersonVisible = true;
            _ReportHelper.IsManagerVisible      = true;
            _ReportHelper.Create(report);
            _ReportHelper.AddHeaderBottomInfo("設定作業項目權限:" + ddlTxnId.EditValue.AsString());

            base.Print(_ReportHelper);
            return(ResultStatus.Success);
        }
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            _ReportHelper = reportHelper;
            CommonReportPortraitA4 report = new CommonReportPortraitA4();

            _ReportHelper.IsHandlePersonVisible = true;
            _ReportHelper.IsManagerVisible      = true;
            _ReportHelper.Create(report);
            _ReportHelper.LeftMemo = "設定權限給(" + ddlUserId.EditValue.AsString() + ")";

            base.Print(_ReportHelper);
            return(ResultStatus.Success);
        }
Beispiel #10
0
 protected override ResultStatus Print(ReportHelper reportHelper)
 {
     try {
         _ReportHelper = reportHelper;
         CommonReportPortraitA4 report = new CommonReportPortraitA4();
         report.printableComponentContainerMain.PrintableComponent = gcMain;
         _ReportHelper.Create(report);
         _ReportHelper.Export(FileType.PDF, _ReportHelper.FilePath);
         base.Print(_ReportHelper);
     } catch (Exception ex) {
         MessageDisplay.Error("列印失敗");
         throw ex;
     }
     return(ResultStatus.Success);
 }
Beispiel #11
0
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            CommonReportPortraitA4 reportPortraitA4 = new CommonReportPortraitA4();

            if (_defReport == null)
            {
                _defReport = new defReport();
            }
            XtraReport xtraReport    = reportHelper.CreateCompositeReport(_defReport, reportPortraitA4);
            string     dateCondition = DateText() == "" ? "" : "," + DateText();

            reportHelper.LeftMemo = ConditionText() + dateCondition;
            reportHelper.Create(xtraReport);

            reportHelper.Print(reportHelper.MainReport);
            ShowReport(_defReport);//xtraReport列印後畫面會莫名被清空
            return(ResultStatus.Success);
        }
Beispiel #12
0
        protected override ResultStatus Print(ReportHelper reportHelper)
        {
            try {
                //ReportHelper reportHelper = new ReportHelper(PrintableComponent, _ReportID, _ReportTitle);
                //reportHelper.FilePath = _DefaultFileNamePath;
                //reportHelper.FileType = FileType.PDF;
                //reportHelper.IsPrintedFromPrintButton = true;

                ReportHelper _ReportHelper = reportHelper;

                if (ddlData.EditValue.AsString() == "KeyInfo")
                {
                    //重點資料
                    CommonReportPortraitA4 reportPortrait = new CommonReportPortraitA4();//設定為直向列印
                    reportPortrait.printableComponentContainerMain.PrintableComponent = gcMain;
                    reportPortrait.IsHandlePersonVisible = false;
                    reportPortrait.IsManagerVisible      = false;
                    _ReportHelper.Create(reportPortrait);
                }
                else
                {
                    //明細資料,欄位比較多
                    CommonReportLandscapeA3 reportLandscape = new CommonReportLandscapeA3();//設定為橫向列印
                    reportLandscape.printableComponentContainerMain.PrintableComponent = gcMain;
                    reportLandscape.IsHandlePersonVisible = false;
                    reportLandscape.IsManagerVisible      = false;
                    _ReportHelper.Create(reportLandscape);
                }

                //寫一行標題的註解,通常是查詢條件
                string leftMemo = labDate.Text + txtSDate.Text.Trim() + labDateBetween.Text.Trim() + txtEDate.Text.Trim() + labDateUnit.Text + " , ";
                leftMemo += labSubType.Text + ddlSubType.Text + " , ";
                leftMemo += labData.Text + ddlData.Text + " , ";
                leftMemo += labSort.Text + ddlSort.Text;
                _ReportHelper.LeftMemo = leftMemo;

                _ReportHelper.Print();

                return(ResultStatus.Success);
            } catch (Exception ex) {
                WriteLog(ex);
            }
            return(ResultStatus.Fail);
        }
Beispiel #13
0
        protected override ResultStatus Print(ReportHelper _ReportHelper)
        {
            try {
                _ReportHelper = new ReportHelper(gcMain, _ProgramID, this.Text);
                CommonReportPortraitA4 reportLandscape = new CommonReportPortraitA4(); //直A4

                reportLandscape.printableComponentContainerMain.PrintableComponent = gcMain;
                reportLandscape.IsHandlePersonVisible = false;
                reportLandscape.IsManagerVisible      = false;
                _ReportHelper.Create(reportLandscape);

                string leftMemo = labTradeDate.Text;
                _ReportHelper.LeftMemo    = leftMemo;
                _ReportHelper.ReportTitle = this.Text + systemType;

                _ReportHelper.Print();
                _ReportHelper.Export(FileType.PDF, _ReportHelper.FilePath);

                return(ResultStatus.Success);
            } catch (Exception ex) {
                WriteLog(ex);
            }
            return(ResultStatus.Fail);
        }