Welcome to EMC Consulting Blogs Sign in | Join | Help

Steve Wright's Blog (2005 - 2012)

I have now left EMC Consulting, if you wish to continue to receive new content then please subscribe to my new blog here: http://zogamorph.blogspot.com

Avery Labels Printing via RDL / Reporting Services

I have just managed to solve the problem of how to give an application the ability to print Avery labels with data from our database.  I only had to support two label formats (L7161 and L7163) and the data requirement was static as well.  So I looked at RDL / Reporting Services and the Report Viewer control. 

 

The way I wrote the report is as follows:

 

  • Set the page size to A4 and all the margins to 0cm.
  • Made sure that the report was not using a Header or Footer.
  • Placed one list control per column of labels on a sheet
  • Changed the size of the list control to be the same as a single label
  • Then set an expression on the list visibility based on the result of the rownumber modulus by the number of columns (making sure each column looked for a unique result)
  • Then added the textboxes for the data making sure there was a gap between the top and bottom of the list control.  Also made sure that the text boxes didn’t push the list box size out.

 

Here are two examples of my attempts at the label printing via RDL.  These were tested on the HP LaserJet 4050 Series PCL6 printer.  I did have trouble trying to line the labels up 100% also using this approach does have some draw backs like updating will become a hard task and the use of the labels will be locked for one use only.

 

But now I have a template it should not be long before I will write Avery label component using RDL.

Published 30 June 2006 13:21 by steve.wright
Attachment(s): LabelsExamples.zip
Anonymous comments are disabled

This Blog

News

Locations of visitors to this page
Powered by Community Server (Personal Edition), by Telligent Systems