public static XtraReport GetCostBuildUpPrintout(string GRNString, int ReceiptID)
        {
            BLL.Receipt          receipt = new BLL.Receipt(ReceiptID);
            CenterCostCalculator GRV     = new CenterCostCalculator();

            GRV.LoadGRV(ReceiptID);
            GRV.LoadCostBuilUp(false, GRNString);
            HCMIS.Desktop.Reports.CostAnalysisSubReport xReportCostAnalysis = new HCMIS.Desktop.Reports.CostAnalysisSubReport();
            xReportCostAnalysis.DataSource = GRV.CostAnalysis(GRNString);

            HCMIS.Desktop.Reports.CostBuildUp xReportCostBuildUp = new HCMIS.Desktop.Reports.CostBuildUp();
            xReportCostBuildUp.DataSource  = GRV.CostBuildUp.DataTable.DefaultView;
            xReportCostBuildUp.xrDate.Text = EthiopianDate.EthiopianDate.GregorianToEthiopian(BLL.DateTimeHelper.ServerDateTime);
            xReportCostBuildUp.xrSubreport1.ReportSource = xReportCostAnalysis;
            xReportCostBuildUp.xrCostedBy.Text           = CurrentContext.LoggedInUserName;
            ReceiveDocConfirmation receiveDocConfirmation = new ReceiveDocConfirmation();
            DataTable Users = receiveDocConfirmation.GetUserNamebyReceipt(ReceiptID);

            if (Users.Rows.Count > 0)
            {
                xReportCostBuildUp.xrCostedBy.Text  = Users.Rows[0]["CostedBy"].ToString();
                xReportCostBuildUp.xrCheckedBy.Text = Users.Rows[0]["CheckedBy"].ToString();
            }
            return(xReportCostBuildUp);
        }
        private void print()
        {
            BLL.Receipt receipt   = new BLL.Receipt(ReceiptID);
            DataRow     dr        = gridGRVsView.GetFocusedDataRow();
            String      GRNString = dr["RefNo"].ToString();

            HCMIS.Desktop.Reports.CostAnalysisSubReport xReportCostAnalysis = new HCMIS.Desktop.Reports.CostAnalysisSubReport();
            xReportCostAnalysis.DataSource = GRV.CostAnalysis(GRNString);

            HCMIS.Desktop.Reports.CostBuildUp xReportCostBuildUp = new HCMIS.Desktop.Reports.CostBuildUp();
            xReportCostBuildUp.DataSource  = GRV.CostBuildUp.DataTable.DefaultView;
            xReportCostBuildUp.xrDate.Text = EthiopianDate.EthiopianDate.GregorianToEthiopian(BLL.DateTimeHelper.ServerDateTime);
            xReportCostBuildUp.xrSubreport1.ReportSource = xReportCostAnalysis;
            xReportCostBuildUp.xrCostedBy.Text           = CurrentContext.LoggedInUserName;
            xReportCostBuildUp.ShowPreviewDialog();
            MemoryStream stream = new MemoryStream();

            xReportCostBuildUp.ExportToPdf(stream);
            HCMIS.Core.Distribution.Services.PrintLogService.SavePrintLogNoWait(stream, "CostAnalysis", true, ReceiptID, CurrentContext.UserId, BLL.DateTimeHelper.ServerDateTime);
        }
        private void print()
        {
            BLL.Receipt receipt = new BLL.Receipt(ReceiptID);
            DataRow dr = gridGRVsView.GetFocusedDataRow();
            String GRNString = dr["RefNo"].ToString();

            HCMIS.Desktop.Reports.CostAnalysisSubReport xReportCostAnalysis = new HCMIS.Desktop.Reports.CostAnalysisSubReport();
            xReportCostAnalysis.DataSource = GRV.CostAnalysis(GRNString);

            HCMIS.Desktop.Reports.CostBuildUp xReportCostBuildUp = new HCMIS.Desktop.Reports.CostBuildUp();
            xReportCostBuildUp.DataSource = GRV.CostBuildUp.DataTable.DefaultView;
            xReportCostBuildUp.xrDate.Text = EthiopianDate.EthiopianDate.GregorianToEthiopian(BLL.DateTimeHelper.ServerDateTime);
            xReportCostBuildUp.xrSubreport1.ReportSource = xReportCostAnalysis;
            xReportCostBuildUp.xrCostedBy.Text = CurrentContext.LoggedInUserName;
            xReportCostBuildUp.ShowPreviewDialog();
            MemoryStream stream = new MemoryStream();
            xReportCostBuildUp.ExportToPdf(stream);
            HCMIS.Core.Distribution.Services.PrintLogService.SavePrintLogNoWait(stream, "CostAnalysis", true, ReceiptID, CurrentContext.UserId, BLL.DateTimeHelper.ServerDateTime);
        }