private void Form1_Load(object sender, EventArgs e) { Barcodes barcodeDetails = new Barcodes(); DataTable dataTable = barcodeDetails._Barcodes; BarcodeReport Report = new BarcodeReport(); int blank_labels = 0; //int numberLabel = Convert.ToInt16(o);// 3; string[] proid = p.Split(','); string[] proname = q.Split(','); string[] procost = r.Split(','); string[] prodate = s.Split(','); string[] prototal = o.Split(','); for (int j = 0; j < proid.Length; j++) { string id = proid[j].Trim(); string name = proname[j].Trim(); string cost = procost[j].Trim(); string date = prodate[j].Trim(); string Total = prototal[j].Trim(); int numberLabel = Convert.ToInt16(Total); for (int i = 0; i < numberLabel; i++) { DataRow drow = dataTable.NewRow(); if (blank_labels <= i) { drow["Barcode"] = "*"; drow["Barcode"] += id;// drow["Barcode"] += "*"; drow["ProductId"] = id;// drow["Product Name"] = name;// drow["Cost"] = "Rs. " + cost; drow["Date"] = date;// } dataTable.Rows.Add(drow); } } Report.Database.Tables["Barcodes"].SetDataSource((DataTable)dataTable); crystalReportViewer1.ReportSource = Report; crystalReportViewer1.Refresh(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)