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

How access TppLabelTemplateWizardDialog.LabelDef property?

edited October 2004 in General
After I show the Label Wizard in code and the user selects a label in
the Label Wizard I need to compute the number of labels per page.
However, I cannot find a way to get to the property since the
TppLabelTemplateWizardDialog is only referenced in a private member of
the Label Wizard.

--
_Bill_

Comments

  • edited October 2004
    Hi Bill,

    I apologize, I did not realize the label dialog was private. Looking at the
    code, it is apparent that the label wizard was not designed to be used this
    way (executed in code). The only way I can see to access the label dialog
    would be to create a custom label wizard, basically copying the current one
    and changing it so you have access to the dialog, or simply the LabelDef
    property of the dialog. Inside this custom label wizard, you could also
    take one step further and create a method that calculates the number of
    labels per page within. Once you create a new wizard, be sure to register
    it in the initialization section using the ppRegisterWizard method, just as
    in the current label wizard code.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2004
    If I had access to LabelDef I could calculate the number of labels per
    page as:

    FLabelsPerPage := ((PaperHeight - MarginTop - MarginBottom) div
    (Height + RowSpacing)) * Columns;

    Is there any way to get these values from the TppReport component? I
    assume Height would be equal to the detail band height but I cannot
    find properties for the other values in TppReport.

    --
    _Bill_

This discussion has been closed.