如何在邮件标签水晶报表中复制标签?

时间:2018-12-28 19:16:03

标签: c# wpf crystal-reports

我正在构建一个销售应用程序,其中用户可以在标签中打印产品的条形码,所以我使用带有水晶报表的Visual Studio WPF platfrom来打印标签,因此我成功地在标签从具有特定公式的条形码值中获取,但是我想知道如何复制该标签,所以说我想在变量中设置标签的数量,以便它可以复制显示的标签的数量。

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

0 个答案:

没有答案