locked
Avery 5160 address label margins RRS feed

  • Question

  • User-1412642538 posted

    Hello,


    I am working on a report to display addresses using the avery 5160 label.  The label has 8.5"x11" printed in standard portrait mode.  There are 3 columns of 10 labels per page and each label is 1" in height.  The page has a top and botton margin of .5".  


    How/where do I need to configure the margins?  The labels print correctly but do not line up properly to the template based upon the calculations I made.


    Thanks in advance!

    -Steven


     <Body>
        <ColumnSpacing>0.0833in</ColumnSpacing>
        <ReportItems>
          <Table Name="table1">
            <DataSetName>DataSet1</DataSetName>
            <Width>2.5in</Width>
            <Details>
              <TableRows>
                <TableRow>
                  <TableCells>
                    <TableCell>
                      <ColSpan>2</ColSpan>
                      <ReportItems>
                        <Textbox Name="guardian_name">
                          <rd:DefaultName>guardian_name</rd:DefaultName>
                          <Style>
                            <FontSize>8pt</FontSize>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                          <ZIndex>3</ZIndex>
                          <CanGrow>true</CanGrow>
                          <Value>=Fields!guardian_name.Value</Value>
                        </Textbox>
                      </ReportItems>
                    </TableCell>
                  </TableCells>
                  <Height>0.25in</Height>
                </TableRow>
                <TableRow>
                  <TableCells>
                    <TableCell>
                      <ColSpan>2</ColSpan>
                      <ReportItems>
                        <Textbox Name="gdnof">
                          <rd:DefaultName>gdnof</rd:DefaultName>
                          <Style>
                            <FontSize>8pt</FontSize>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                          <ZIndex>2</ZIndex>
                          <CanGrow>true</CanGrow>
                          <Value>=Fields!gdnof.Value & " " & Fields!studentname.Value</Value>
                        </Textbox>
                      </ReportItems>
                    </TableCell>
                  </TableCells>
                  <Height>0.25in</Height>
                </TableRow>
                <TableRow>
                  <TableCells>
                    <TableCell>
                      <ColSpan>2</ColSpan>
                      <ReportItems>
                        <Textbox Name="textbox3">
                          <rd:DefaultName>textbox3</rd:DefaultName>
                          <Style>
                            <FontSize>8pt</FontSize>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                          <ZIndex>1</ZIndex>
                          <CanGrow>true</CanGrow>
                          <Value>=Fields!addr.Value</Value>
                        </Textbox>
                      </ReportItems>
                    </TableCell>
                  </TableCells>
                  <Height>0.25in</Height>
                </TableRow>
                <TableRow>
                  <TableCells>
                    <TableCell>
                      <ColSpan>2</ColSpan>
                      <ReportItems>
                        <Textbox Name="textbox7">
                          <rd:DefaultName>textbox7</rd:DefaultName>
                          <Style>
                            <FontSize>8pt</FontSize>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                          <CanGrow>true</CanGrow>
                          <Value>=Fields!Expr1.Value</Value>
                        </Textbox>
                      </ReportItems>
                    </TableCell>
                  </TableCells>
                  <Height>0.25in</Height>
                </TableRow>
              </TableRows>
            </Details>
            <Style>
              <FontSize>8pt</FontSize>
            </Style>
            <TableColumns>
              <TableColumn>
                <Width>1.25in</Width>
              </TableColumn>
              <TableColumn>
                <Width>1.25in</Width>
              </TableColumn>
            </TableColumns>
          </Table>
        </ReportItems>
        <Height>1in</Height>
        <Columns>3</Columns>
        <Style>
          <BorderStyle>
            <Default>Solid</Default>
            <Left>Solid</Left>
            <Right>Solid</Right>
            <Top>Solid</Top>
            <Bottom>Solid</Bottom>
          </BorderStyle>
          <BorderWidth>
            <Left>1pt</Left>
            <Right>1pt</Right>
            <Top>1pt</Top>
            <Bottom>1pt</Bottom>
          </BorderWidth>
        </Style>
      </Body>


    Tuesday, January 25, 2011 4:56 PM

All replies

  • User-1528094326 posted

    I actually made a report that uses Avery 5160 a while back to print some barcodes for my Inventory system. Here is the RDLC file I used for that, that handles spreading it out accross 3 columns and all. Let me know if I can help you any further! This was made with VS 2008. 

    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
      <DataSources>
        <DataSource Name="DummyDataSource">
          <rd:DataSourceID>29b1be47-256d-457a-96bb-b4496c719ca0</rd:DataSourceID>
          <ConnectionProperties>
            <DataProvider>SQL</DataProvider>
            <ConnectString />
          </ConnectionProperties>
        </DataSource>
      </DataSources>
      <InteractiveHeight>11in</InteractiveHeight>
      <rd:DrawGrid>true</rd:DrawGrid>
      <InteractiveWidth>8.5in</InteractiveWidth>
      <rd:SnapToGrid>true</rd:SnapToGrid>
      <RightMargin>0.25in</RightMargin>
      <LeftMargin>0.25in</LeftMargin>
      <BottomMargin>0.4in</BottomMargin>
      <rd:ReportID>70a8342e-25df-46e2-bae0-7f5bca370029</rd:ReportID>
      <DataSets>
        <DataSet Name="Reports_Barcodes_Data">
          <Fields>
            <Field Name="Barcode">
              <DataField>Barcode</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Name">
              <DataField>Name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="PackageType">
              <DataField>PackageType</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="PackageSize">
              <DataField>PackageSize</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="MFG">
              <DataField>MFG</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="MFGNumber">
              <DataField>MFGNumber</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>DummyDataSource</DataSourceName>
            <CommandText />
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
          <rd:DataSetInfo>
            <rd:ObjectDataSourceType>Reports_Barcodes, App_Code.78xuo2pa, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
            <rd:ObjectDataSourceSelectMethod>GetBarcodes</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceSelectMethodSignature>System.Collections.Generic.List`1[Reports_Barcodes_Data] GetBarcodes(System.String, System.Object)</rd:ObjectDataSourceSelectMethodSignature>
          </rd:DataSetInfo>
        </DataSet>
      </DataSets>
      <Code />
      <Width>7.875in</Width>
      <Body>
        <ColumnSpacing>0.125in</ColumnSpacing>
        <ReportItems>
          <List Name="list1">
            <ZIndex>2</ZIndex>
            <DataSetName>Reports_Barcodes_Data</DataSetName>
            <Visibility>
              <Hidden>=iif(RowNumber(Nothing) mod 3 = 1, false, true)</Hidden>
            </Visibility>
            <ReportItems>
              <Table Name="table2">
                <Details>
                  <TableRows>
                    <TableRow>
                      <TableCells>
                        <TableCell>
                          <ReportItems>
                            <Rectangle Name="rectangle1">
                              <ZIndex>4</ZIndex>
                              <ReportItems>
                                <Textbox Name="textbox2">
                                  <rd:DefaultName>textbox2</rd:DefaultName>
                                  <Top>0.25in</Top>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <PaddingLeft>2pt</PaddingLeft>
                                    <PaddingRight>2pt</PaddingRight>
                                    <PaddingTop>2pt</PaddingTop>
                                    <PaddingBottom>2pt</PaddingBottom>
                                  </Style>
                                  <ZIndex>1</ZIndex>
                                  <CanGrow>true</CanGrow>
                                  <Value>=Fields!Barcode.Value & VBCRLF &
    Fields!Name.Value & VBCRLF &
    Fields!MFG.Value & "  |  " & Fields!MFGNumber.Value</Value>
                                </Textbox>
                                <Textbox Name="textbox1">
                                  <rd:DefaultName>textbox1</rd:DefaultName>
                                  <Style>
                                    <FontFamily>Free 3 of 9 Extended</FontFamily>
                                    <FontSize>22pt</FontSize>
                                    <PaddingLeft>2pt</PaddingLeft>
                                    <PaddingRight>2pt</PaddingRight>
                                    <PaddingTop>2pt</PaddingTop>
                                    <PaddingBottom>2pt</PaddingBottom>
                                  </Style>
                                  <CanGrow>true</CanGrow>
                                  <Height>0.25in</Height>
                                  <Value>="*" & Fields!Barcode.Value & "*"</Value>
                                </Textbox>
                              </ReportItems>
                            </Rectangle>
                          </ReportItems>
                        </TableCell>
                      </TableCells>
                      <Height>1in</Height>
                    </TableRow>
                  </TableRows>
                </Details>
                <TableColumns>
                  <TableColumn>
                    <Width>2.5in</Width>
                  </TableColumn>
                </TableColumns>
              </Table>
            </ReportItems>
            <Width>2.5in</Width>
            <Grouping Name="list1_Details_Group">
              <GroupExpressions>
                <GroupExpression>=Fields!Barcode.Value</GroupExpression>
              </GroupExpressions>
            </Grouping>
          </List>
          <List Name="list2">
            <ZIndex>1</ZIndex>
            <Left>2.75in</Left>
            <DataSetName>Reports_Barcodes_Data</DataSetName>
            <Visibility>
              <Hidden>=iif(RowNumber(Nothing) mod 3 = 2, false, true)</Hidden>
            </Visibility>
            <ReportItems>
              <Table Name="table1">
                <Details>
                  <TableRows>
                    <TableRow>
                      <TableCells>
                        <TableCell>
                          <ReportItems>
                            <Rectangle Name="rectangle2">
                              <ZIndex>4</ZIndex>
                              <ReportItems>
                                <Textbox Name="textbox5">
                                  <Style>
                                    <FontFamily>Free 3 of 9 Extended</FontFamily>
                                    <FontSize>22pt</FontSize>
                                    <PaddingLeft>2pt</PaddingLeft>
                                    <PaddingRight>2pt</PaddingRight>
                                    <PaddingTop>2pt</PaddingTop>
                                    <PaddingBottom>2pt</PaddingBottom>
                                  </Style>
                                  <ZIndex>1</ZIndex>
                                  <CanGrow>true</CanGrow>
                                  <Height>0.25in</Height>
                                  <Value>="*" & Fields!Barcode.Value & "*"</Value>
                                </Textbox>
                                <Textbox Name="textbox3">
                                  <Top>0.25in</Top>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <PaddingLeft>2pt</PaddingLeft>
                                    <PaddingRight>2pt</PaddingRight>
                                    <PaddingTop>2pt</PaddingTop>
                                    <PaddingBottom>2pt</PaddingBottom>
                                  </Style>
                                  <CanGrow>true</CanGrow>
                                  <Value>=Fields!Barcode.Value & VBCRLF &
    Fields!Name.Value & VBCRLF &
    Fields!MFG.Value & "  |  " & Fields!MFGNumber.Value</Value>
                                </Textbox>
                              </ReportItems>
                            </Rectangle>
                          </ReportItems>
                        </TableCell>
                      </TableCells>
                      <Height>1in</Height>
                    </TableRow>
                  </TableRows>
                </Details>
                <TableColumns>
                  <TableColumn>
                    <Width>2.5in</Width>
                  </TableColumn>
                </TableColumns>
              </Table>
            </ReportItems>
            <Width>2.5in</Width>
            <Grouping Name="list2_Details_Group">
              <GroupExpressions>
                <GroupExpression>=Fields!Barcode.Value</GroupExpression>
              </GroupExpressions>
            </Grouping>
          </List>
          <List Name="list3">
            <Left>5.5in</Left>
            <DataSetName>Reports_Barcodes_Data</DataSetName>
            <Visibility>
              <Hidden>=iif(RowNumber(Nothing) mod 3 = 0, false, true)</Hidden>
            </Visibility>
            <ReportItems>
              <Table Name="table3">
                <Details>
                  <TableRows>
                    <TableRow>
                      <TableCells>
                        <TableCell>
                          <ReportItems>
                            <Rectangle Name="rectangle3">
                              <ZIndex>4</ZIndex>
                              <ReportItems>
                                <Textbox Name="textbox6">
                                  <Style>
                                    <FontFamily>Free 3 of 9 Extended</FontFamily>
                                    <FontSize>22pt</FontSize>
                                    <PaddingLeft>2pt</PaddingLeft>
                                    <PaddingRight>2pt</PaddingRight>
                                    <PaddingTop>2pt</PaddingTop>
                                    <PaddingBottom>2pt</PaddingBottom>
                                  </Style>
                                  <ZIndex>1</ZIndex>
                                  <CanGrow>true</CanGrow>
                                  <Height>0.25in</Height>
                                  <Value>="*" & Fields!Barcode.Value & "*"</Value>
                                </Textbox>
                                <Textbox Name="textbox4">
                                  <Top>0.25in</Top>
                                  <Style>
                                    <FontSize>8pt</FontSize>
                                    <PaddingLeft>2pt</PaddingLeft>
                                    <PaddingRight>2pt</PaddingRight>
                                    <PaddingTop>2pt</PaddingTop>
                                    <PaddingBottom>2pt</PaddingBottom>
                                  </Style>
                                  <CanGrow>true</CanGrow>
                                  <Value>=Fields!Barcode.Value & VBCRLF &
    Fields!Name.Value & VBCRLF &
    Fields!MFG.Value & "  |  " & Fields!MFGNumber.Value</Value>
                                </Textbox>
                              </ReportItems>
                            </Rectangle>
                          </ReportItems>
                        </TableCell>
                      </TableCells>
                      <Height>1in</Height>
                    </TableRow>
                  </TableRows>
                </Details>
                <TableColumns>
                  <TableColumn>
                    <Width>2.375in</Width>
                  </TableColumn>
                </TableColumns>
              </Table>
            </ReportItems>
            <Grouping Name="list3_Details_Group">
              <GroupExpressions>
                <GroupExpression>=Fields!Barcode.Value</GroupExpression>
              </GroupExpressions>
            </Grouping>
          </List>
        </ReportItems>
        <Height>1in</Height>
      </Body>
      <Language>en-US</Language>
      <TopMargin>0.4in</TopMargin>
    </Report>


     

    Tuesday, January 25, 2011 5:53 PM
  • User-1412642538 posted

    Scott,


    Thanks for the reply!  I'm still having issues despite following your example.  I'm beginning to wonder if this is an issue with our office printer...



    Monday, January 31, 2011 9:50 AM
  • User-1528094326 posted

    What's the issue(s) your having? 

    Monday, January 31, 2011 10:54 AM
  • User-1528094326 posted

    Just a thought, please note that if you are using a PS (Postscript) driver instead of like a PCL5 or PCL6 driver, it usually omits the formatting and margins for the usual office printers. 

    Monday, January 31, 2011 11:02 AM