0
Reply

Aligment issue in Crystal Report

Ask a question
Harrikanth

Harrikanth

10y
661
1
Hello Guys,

I need a solution for my crystal report printing issue which i have stated below.

I have developed a bar-code printing option in my application where i have to print 4 column in a row. i have done it successfully but i have faced a issue by getting a empty row in my printer for example, "If i have given 24 items to print, it prints 4 rows correctly and also it prints me one empty row in last". So kindly some one help me to solve this issue i am on a heretic position. Also i have given my code below for check it.
Thanks.

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(); }