Esempio n. 1
0
        private XtraReport rpt()
        {
            sc   = new wrCustomers.Server2Client();
            cust = new wrCustomers.wsCustomers();
            sc   = cust.getCustomersFull();
            Utils u = new Utils();

            rptCustomers rpt = new rptCustomers()
            {
                DataSource = sc.dataTable
            };

            XRSummary tbal = new XRSummary();

            rpt.lbCNM.DataBindings.Add("Text", null, "CustomerName");
            rpt.lbADR.DataBindings.Add("Text", null, "Address");
            rpt.lbPHN.DataBindings.Add("Text", null, "Phone");
            rpt.lbEML.DataBindings.Add("Text", null, "Email");
            rpt.lbBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");
            rpt.lbTBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");

            tbal.FormatString  = "{0:C2}";
            tbal.Running       = SummaryRunning.Report;
            rpt.lbTBAL.Summary = tbal;
            return(rpt);
        }
Esempio n. 2
0
        private void bCustomersList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            wrCustomers.Server2Client sc  = new wrCustomers.Server2Client();
            wrCustomers.wsCustomers   cus = new wrCustomers.wsCustomers();
            sc = cus.getCustomersFull();

            rptCustomers rpt = new rptCustomers()
            {
                DataSource = sc.dataTable
            };

            XRSummary tbal = new XRSummary();

            rpt.lbCNM.DataBindings.Add("Text", null, "CustomerName");
            rpt.lbADR.DataBindings.Add("Text", null, "Address");
            rpt.lbPHN.DataBindings.Add("Text", null, "Phone");
            rpt.lbEML.DataBindings.Add("Text", null, "Email");
            rpt.lbBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");
            rpt.lbTBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");

            tbal.FormatString  = "{0:C2}";
            tbal.Running       = SummaryRunning.Report;
            rpt.lbTBAL.Summary = tbal;

            dv.PrintingSystem = rpt.PrintingSystem;
            rpt.CreateDocument(true);
        }