private void bPCATS_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { wrProducts.Server2Client sc = new wrProducts.Server2Client(); wrProducts.wsProducts pd = new wrProducts.wsProducts(); sc = pd.ProductListByCategorySimplified(); rptProductByCat rpt = new rptProductByCat() { DataSource = sc.dataTable }; GroupField grp = new GroupField("CategoryName"); rpt.groupHeader.GroupFields.Add(grp); rpt.lbCAT.DataBindings.Add("Text", null, "CategoryName"); rpt.lbPNM.DataBindings.Add("Text", null, "ProductName"); rpt.lbBVL.DataBindings.Add("Text", null, "BuyingValue", "{0:C2}"); rpt.lbSVL.DataBindings.Add("Text", null, "SellingValue", "{0:C2}"); rpt.lbQTY.DataBindings.Add("Text", null, "SumOfQuantity"); rpt.lbBCD.Text = ""; //rpt.lbSBVL.DataBindings.Add("Text", null, "BuyingValue", "{0:C2}"); //rpt.lbSSVL.DataBindings.Add("Text", null, "SellingValue", "{0:C2}"); //rpt.lbSQTY.DataBindings.Add("Text", null, "Quantity"); //rpt.lbGBVL.DataBindings.Add("Text", null, "BuyingValue", "{0:C2}"); //rpt.lbGSVL.DataBindings.Add("Text", null, "SellingValue", "{0:C2}"); //rpt.lbGQTY.DataBindings.Add("Text", null, "Quantity"); //sbvl.FormatString = "{0:C2}"; //ssvl.FormatString = "{0:C2}"; //gbvl.FormatString = "{0:C2}"; //gsvl.FormatString = "{0:C2}"; //sbvl.Running = SummaryRunning.Group; //ssvl.Running = SummaryRunning.Group; //sqty.Running = SummaryRunning.Group; //gbvl.Running = SummaryRunning.Report; //gsvl.Running = SummaryRunning.Report; //gqty.Running = SummaryRunning.Report; //rpt.lbSBVL.Summary = sbvl; //rpt.lbSSVL.Summary = ssvl; //rpt.lbSQTY.Summary = sqty; //rpt.lbGBVL.Summary = gbvl; //rpt.lbGSVL.Summary = gsvl; //rpt.lbGQTY.Summary = gqty; dv.PrintingSystem = rpt.PrintingSystem; rpt.CreateDocument(true); }