= ĬrystalReportViewer1.ReportSource = report 'NOTE: Give write permission to ASPNET account to Temp folderĭim DiskOptions As = New ĭiskOptions.DiskFileName = "C:\\TEMP\\AveryMailLabelsWithBarcodeImages.pdf"
#Avery barcode maker pdf
'Export report to PDF format into C:\Temp folder Report = New ()ĭim rptFile As String = Server.MapPath("AveryMailLabels.rpt") 'and set its data source with the DataSetĭim report As 'We're going to encode the PostalCode columnīc.Code = CType(dr("PostalCode"), String)ĭr("BarcodeImage") = bc.GetBarcodeImage(.Png) 'We are going to use Postnet Barcode Symbologyīc.PostnetHeightShortBar = 0.06F 'Set 5 if you use Barcode Professional 2.5īc.PostnetHeightTallBar = 0.135F 'Set 12 if you use Barcode Professional 2.5īc.BarWidth = 0.02F 'Set 2 if you use Barcode Professional 2.5įor Each dr As DataRow In ds.Tables(0).Rows 'Create a BarcodeProfessional object to fillĭim bc As BarcodeProfessional = New BarcodeProfessional 'Add the BarcodeImage column to the DataTable 'WARNING: you must name it as you did in the XML Schemaĭim dc As DataColumn = New DataColumn("BarcodeImage", GetType(Byte())) 'the BarcodeImage "column" or element we've included 'The XML File with the data DOES NOT include 'REMEMBER to copy the XML file in the application rootĭim xmlFile As String = Server.MapPath("AdventureWorksEmployees.xml")