Как продублировать ярлыки в отчете Crystal Report? - PullRequest
0 голосов
/ 28 декабря 2018

Я создаю приложение для продажи, в котором пользователь может распечатать штрих-код продукта на этикетке, поэтому я использую платформу Visual Studio WPF с Crystal Report для печати этикетки, мне удалось отобразить штрих-код вметка из значения штрих-кода с определенной формулой, но мне интересно, как продублировать эту метку, так что я хотел бы установить количество меток в переменной, чтобы оно могло дублировать количество отображаемых меток.

DataRowView row = ArticleGrid.SelectedItem as DataRowView;// this is a datarow contained in a datagrid which has the barcode in the first column
CodeàBarre report = new CodeàBarre();// create new report
report.DataDefinition.FormulaFields["barcode"].Text = "Generar_EAN13('"+row["Code à Barre"]+"')";//barcode is a formula field and Generar_EAN13 is the formula in crystal report that converts number into a barcode
TextObject désignation = report.ReportDefinition.ReportObjects["Text2"] as TextObject;//this is a report textfield that contains product's name
TextObject prix = report.ReportDefinition.ReportObjects["Text3"] as TextObject;//this is a report textfield that contains product's price
désignation.Text = row["Désignation"].ToString();// this is to assign the report textfield's value
prix.Text ="PU: "+row["Prix de Vente"].ToString()+" DA";// this is to assign the report textfield's value
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...