Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

print labels LP4MS4725

edited March 2006 in General
?hi,

i need tio printer codebar label, i need to print the labels on sheet A4:
LP4MS4725 - labels 44 - 4 coulomn, 11 row - 47,5mm x 25,5mm

in the wizard there are no this kind: LP4MS4725


pleas help
how cai i print it?



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited March 2006
    Hi Ennio,

    Take a look at the following article on printing custom labels.

    --------------------------------------------------
    Article: Adding Custom Labels to the Label Wizard
    --------------------------------------------------

    The ReportBuilder Label Wizard contains an extensible architecture that
    enables additional sets of labels to be created and registered.

    Creating new label sets is a very simple process.

    1. Open ppLabelDef.pas located in RBuilder\Source.

    This unit contains the TppLabelSet class which is the abstract ancestor
    class for all label sets. This class contains the necessary logic to
    translate label specs into report specs.

    Descending from this class are two additional classes TppLaserJetLabels and
    TppDotMatrixLabels. All label sets should descend from one of these two
    classes.

    2. Open ppAvStd.pas located in RBuilder\Source

    This unit contains the TppAveryStandardLaserJetLabels class and the
    TppAveryStandardDotMatrixLabels class.

    The label specs are declared as const arrays, with each string element of
    the array representing a specific type of label.

    Example code from ppAvStd.pas:

    const
    caAveryStdLaserJet: array [0..157] of String = (

    { LabelType, Name,
    Width, Height, MarginTop, MarginBottom, MarginLeft, MarginRight,
    Orientation, RowSpacing, Units, Columns, ColumnPositions }

    'Address,2160 - Mini,2.63,1,4.5,5,0.5,0,0.81,0,0,0,1,0',
    'Address,2162 - Mini,4,1.33,4.5,5,0.5,0,0.12,0,0,0,1,0',


    As you can see in the above example code, each label spec consist of a comma
    delimited string that describes the dimensions of the label and the label
    sheet.

    3. The LabelSet class defintion for AVeryStdLaserJet labels consist of three
    methods, each containing a single line of code. These are shown below:


    {------------------------------------------------------------------------------}
    { TppAveryStdLaserJetLabels.Product }

    class function TppAveryStdLaserJetLabels.Product: String;
    begin
    Result := 'Avery Standard';
    end; {class function, Product}

    {------------------------------------------------------------------------------}
    { TppAveryStdLaserJetLabels.Count }

    class function TppAveryStdLaserJetLabels.Count: Integer;
    begin
    Result := High(caAveryStdLaserJet) + 1;
    end; {class function, Count}

    {------------------------------------------------------------------------------}
    { TppAveryStdLaserJetLabels.GetLabelDef }

    class function TppAveryStdLaserJetLabels.GetLabelDef(aIndex: Integer):
    String;
    begin
    Result := caAveryStdLaserJet[aIndex];
    end; {class function, GetLabelDef}


    4. The initialization/finalization sections at the bottom of the unit
    contain the RegisterLabelSet calls to make the label set known to the Label
    Wizard.


    5. ppAvIntl.pas located in RBuilder\Source contains the definitions for
    Avery International Labels.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hi Nico,

    my question:
    { LabelType, Name,
    Width, Height, MarginTop, MarginBottom, MarginLeft, MarginRight,
    Orientation, RowSpacing, Units, Columns, ColumnPositions }

    'Address,2160 - Mini,2.63,1,4.5,5,0.5,0,0.81,0,0,0,1,0',
    'Address,2162 - Mini,4,1.33,4.5,5,0.5,0,0.12,0,0,0,1,0',

    Width, Height... are mm or inch?


    and
    of
    comma
    label
    three
    -------}
    -------}
    -------}
    Label
    A4:



    --- posted by geoForum on http://delphi.newswhat.com
  • edited March 2006
    Hi Ennio,

    These measurements are in inches. For an easy conversion, there are 25.4
    millimeters in 1 inch.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hi Nico,

    i've changed code in ppAvStd.pas:

    'Address,2160 - Mini,2.63,1,4.5,5,0.5,0,0.81,0,0,0,1,0',
    to
    'Address,2160 - Mini,1.20,1,4.5,5,0.5,0,0.81,0,0,0,1,0',

    and i've saved the file.

    now what i need to do to see this value into label-wizard?

    i need to compile some files?

    please, tell me haw i can do it?

    tks


    25.4



    --- posted by geoForum on http://delphi.newswhat.com
  • edited March 2006
    Hi Ennio,

    If your library path is pointing toward \RBuilder\Source, you now just need
    to re-build your application and the entry for Address,2160 - Mini should be
    a new size.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hi Nico and tks for your help!

    in D7 menu Tools->enviroment options---->Library->Library Path, i've
    insert the path '$(DELPHI)\RBuilder\Source' (also try
    with 'C:\Programmi\Borland\Delphi7\RBuilder\Source')
    but nothing is change when i've do the labels with wizard! the size for
    Address,2160 - Mini is 2,63

    please tell me how can i do it.

    regards


    need
    should be



    --- posted by geoForum on http://delphi.newswhat.com
  • edited March 2006
    Hi Ennio,

    Be sure the \RBuilder\Lib directory is no longer in the library path. As a
    test, try placing a breakpoint inside the edited source file and see if that
    code is actually being executed.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    i've tryed. i think that the code is not executed.

    in D7 menu Tools->enviroment options---->Library->Library Path, i've
    only the path '$(DELPHI)\RBuilder\Source'
    i've deleted '$(DELPHI)\RBuilder\Lib'

    nothing is change when i've do the labels with wizard! the size for
    Address,2160 - Mini is 2,63

    remember that i've only changed the code in ppAvStd.pas from



    what is wrong?


    regards




    As a
    that
    for



    --- posted by geoForum on http://delphi.newswhat.com
  • edited March 2006
    Hi Ennio,

    In my testing I quickly changed the line

    'Address,2160 - Mini,2.63,1,4.5,5,0.5,0,0.81,0,0,0,1,0',

    to

    'Address,2160 - Mini,1,1,4.5,5,0.5,0,0.81,0,0,0,1,0',

    This seemed to change the label wizard definition correctly. Note that the
    comment at the top of the definitions is incorrect an should look like the
    following...

    { LabelType, Name, Width, Height, PaperWidth, PaperHeight,
    MarginTop, MarginBottom, MarginRight, MarginLeft, Orientation,
    RowSpacing, Units, Columns, ColumnPositions }

    Be sure you are defining the proper PaperHeight and PaperWidth for your
    label type.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.