Use MicrosoftReportViewer and a Dymo LabelWriter to create a really nice and 3of9 barcode label

I have to say, I had fun coding this feature.  I wanted to print some 3of9 bar code labels for employee badges in a WinForms app I am rolling out. I was thinking this was going to involve some custom api and buying some font package (some are big $$). It turned out this was surprisingly simple and a fun report to build. Here is a sample label (extra points for first person to discover what is the barcode:


What you need:

  1. SqlServer or some other data source.  I am using Linq and Entity Framework. You could you XML, csv or memory objects as you need.
  2. Visual Studio and the MicrosoftReportViewer control. Not sure if this is included in Express addition or not. Let me know.
  3. A Dymo LabelWriter 400 or other such printer that can print single labels in a stream. I really like the Dymo for its ease of use, simple loading, and it is well made.  Also it is a thermal printer, so you don’t need to change any ribbons – ever.  About $100.  Order the label sizes you need – remember you need to order their special labels as they are thermal. I am using 3.5" x 1".  I also like this, because you don’t waste a lot of labels like trying to print 8.5"x11" sheets.  You always end up with half a sheet you don’t know what to do with.  So get a Dymo, you can use it for other things too.
  4. A 3of9 TrueType font. I use the Free3of9 ttfs here:  Hats off to Matthew Welch for his nice font package he is sharing!
    Just download and install the two fonts from the Control panel.

Steps to create the label report.  I am using 3.5" x 1" labels, but same steps apply for other sizes:

  1. Install the Free3of9 fonts and logout and back in to get the fonts loaded.
  2. Create a VS WinForms project. You could do the same with WPF, but I used WinForms.
  3. Add a new Form to hold your report control.
  4. Add a MicrosoftReportViewer control to the form. I have to give props to MS for this control. It is a great control that puts a lot of power in your hands.
  5. Create a new report from the drop down on the top right of the control.
  6. Once your in the designer, change the report properties Layout to 3.4in wide and .9in high.  I set it just a tad smaller then the label so as not to get strange page breaks.  Set all four margins to 0.
  7. Change the Body of the report surface to 3.4 x .9in or smaller. Just don’t make it larger then the page layout or you will get page breaks
  8. Now your surface is your "label".  Add your Table and other controls as needed for your label within this surface.
  9. Change the font family to 3of9 Extended for the field that you want to show as a barcode.
  10. Add as many Detail rows to your table as you need vertically.  I used 2 rows to show Employee name on top and EmployeeID as Barcode under it.
  11. Select the last row and right-click "Edit Group…" and group on some unique field such as employee id.  Also Check "Page break at end." so that your page will break to a new label after each employee.
  12. In the load event of the form, get your data as a list and set the DataSource property of the report control to the list and RefreshReport() after that.
  13. Run your report and adjust things as needed.  Fast, clean and professional barcodes in a snap right from your next windows application.


  • Set the Dymo Advanced properties on the printer driver to "Barcodes and images" to get really clean quality. Set the Color to black and white, not sure why they have a Color option, but you can play with output as needed.
  • Can also use this same method to make a production receipt printer application with the Dymo with full graphics abilities.  Just get the Receipt paper they offer and change the report size.
  • Not sure how to make it print directly to a printer without user intervention yet.  Say you wanted a receipt to print after clicking a button and not show the print dialog.  If anyone knows how to make ReportViewer do this, please let me know.
  • Have fun with your new 3of9 labels!  I will try to add some pictures here and a sample project soon.
  • When I get my USB barcode scanner with Serial simulation driver, I hope to post back with some code showing how to use the Serial class so we can scan our new labels.


This entry was posted in Uncategorized. Bookmark the permalink.

7 Responses to Use MicrosoftReportViewer and a Dymo LabelWriter to create a really nice and 3of9 barcode label

  1. Unknown says: Hp dv2200 Battery Hp dv4000 Battery Hp dv6000 Battery Ibm thinkpad t40 Battery Toshiba satellite a105 Battery Toshiba satellite m45 Battery Toshiba pa3285u-3bas Battery Toshiba pa3395u-1brs Battery Toshiba pa3399u-1bas Battery Toshiba pa3399u-1brs Battery Toshiba pa3399u-2bas Battery Toshiba pa3399u-2brs Battery laptop battery laptop batteries Toshiba pa3465u-1brs Battery Toshiba pa3534u-1brs Battery Toshiba pa3594u-1brs Battery Uniwill 255-3s4400-g1l1 Battery Uniwill 258-4s4400-s1p1 Battery HP pavilion dv9000 Battery HP pavilion dv9700 Battery HP pavilion dv9500 Battery HP pavilion dv9600 Battery Dell inspiron b130 Battery Dell inspiron mini 9 Battery Hp nc8230 Battery Hp nc8430 Battery Hp nw8000 Battery Hp nw8200 Battery Hp nc6200 Battery Hp nc6100 Battery Hp nc6120 Battery Hp nc6400 Battery Hp pavilion dv2000 Battery Hp pavilion dv6000 Battery Hp pavilion dv8000 Battery Hp pavilion dv9000 Battery Hp pavilion dv9500 Battery Hp pavilion dv9600 Battery Hp pavilion dv9700 Battery Acer aspire 5520 Adapter Acer aspire 5920 Adapter Dell kd476 Battery Dell kr-onx511 Battery Dell latitude d620 Battery Dell latitude d630 Battery

Comments are closed.