-1

I am trying to replace our outdated shipping label program with a SQL Server report, and I am very green when it comes to doing this. I am testing using an ODBC connection with some sample data. I have created a DataSource which is a simple "SELECT * FROM LABELLIST" statement. Each row in this table contains ONE label. In the DataSet I have each column that is needed (To, From, Carrier, PO, etc) listed. I have dragged the fields onto a blank report and in the expression it is set to "=Fields!FROMADDRESS.Value". As mentioned earlier, each ROW is a new label, but when previewing, I only get the first record as a label. What do I have to use (tablix, matrix, list, grouping?) to accomplish this and how?. I'm not sure how to search for this answer online and was hoping to get a reference page to read on how to do it. Everything I've found pertaining to labels or "row to page mapping" is showing how to print multiple labels/rows to one page and not each row to a single page.

EdIt: to clarify, each label is being sent to a zebra thermal printer and follows a similar format to a UPS or FedEx shipping label. Each row in the table will be one shipping label.

user12885
  • 13
  • 1
  • 3
  • http://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/mssqlserver/creating-mailing-labels-in-sql/ – JamieD77 Jan 23 '19 at 16:45
  • I've read this, but it is not the correct layout. I need to have each of those labels that are being put on an entire page to be one on each page. – user12885 Jan 23 '19 at 16:58

1 Answers1

0

The key for you to understand is how SSRS handles Page Breaks. I have a similar answer here.

  1. Whatever formatting you have for your labels should be placed inside a Rectangle.
  2. Place this rectangle into a table with one cell that is grouped by label ID.
  3. Set the group to page break between instances.

This makes the report repeat one instance of the label on each page. It can be a little tricky to understand at first, but it is a very useful trick. I have used this for reports like invoices where we needed one on each page.

StevenWhite
  • 5,907
  • 3
  • 21
  • 46
  • I guess I have each field in a rectangle. Can I create a new one around the current format or do I have to redesign the label? – user12885 Jan 23 '19 at 17:25
  • 1
    Don't draw the rectangle around the existing items as the report designer does not always behave how you expect. Instead, temporarily make the report roughly twice the size you need, then draw new large rectangle in the blank space, then CUT the existing items, then select your new rectangle and paste inside it. This way the items will be contained in the rectangle correctly. You can then reduce the report down to the original required size. – Alan Schofield Jan 23 '19 at 18:13
  • Exactly, thanks. And individual items do not need their own rectangles. Just one to hold them all in place is usually sufficient. – StevenWhite Jan 24 '19 at 17:45
  • Thank You StevenWhite and Alan this worked perfectly – user12885 Jan 24 '19 at 18:06