Posted 31 May 2018, 9:13 am EST
Dear All,
I need a sample VB.Net to use the QRCode in a Flexreport and print it out as a label .
Any help is appreciated.
Best regards
Said
Forums Home / ComponentOne / WinForms Edition
Posted by: saidnai on 31 May 2018, 9:13 am EST
Posted 31 May 2018, 9:13 am EST
Dear All,
I need a sample VB.Net to use the QRCode in a Flexreport and print it out as a label .
Any help is appreciated.
Best regards
Said
Posted 1 June 2018, 2:22 am EST
Hello Said,
You can create a labelled report by selecting the Labels layout in the Step 3 of the FlexReport Wizard. Following this, you may choose the label dimensions, paper type, etc.
See this documentation link for more clarity on the same:
http://help.grapecity.com/componentone/NetHelp/FlexReport/webframe.html#Step1of4CreatingaReportDefinition.html
You can use the Report Styles from the FlexReport Wizard or the Report Styles option present under the Format group of the Home Tab. It opens the Report Style Editor dialog box, where you can choose a built-in style or create and edit your own custom style. These styles work as templates to design a report.
Home Tab: http://help.grapecity.com/componentone/NetHelp/FlexReport/webframe.html#HomeTab.html
Further, QRCode can be set at runtime using the BarcodeField of C1Flexreport, using this code snippet:
```
Dim qrCode As New C1.Win.FlexReport.BarCodeField()
qrCode.Name = “Field1”
qrCode.Left = 645
qrCode.Top = 795
qrCode.Width = 3900
qrCode.Height = 2160
qrCode.Text.Expression = “PostalCode”
qrCode.BarCode = C1.Win.C1Document.BarCodeEnum.QRCode
C1FlexReport1.Sections.Detail.Fields.Add(qrCode)
In order to set a label printer for a report, you can use the below mentioned code which makes use of the C1PrintOptions class:
```
Dim options As New C1.Win.C1Document.C1PrintOptions
options.PrinterSettings = New PrinterSettings()
options.PrinterSettings.PrinterName = "Specific Label Printer Name"
C1FlexReport1.Print(options)
A sample has been attached for your reference.
Best Regards,
Esha
prj_C1FlexReport_Test.zip