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

printing labels copies dynamically

edited September 2006 in General
after working with the demo SkipLabelsWithCopiesRAP
I am now need to dynamically change the number of copies for each single
item, any ideas ?

thanks

Comments

  • edited September 2006
    Isaac,

    In the example you will notice that the FCopies property is set by a
    paremeter in RAP. This is what controls how many copies of each label will
    print. Changing this value based on the record value will give you the
    effect you are after.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    ok,
    - some times I need to pass the number of copies to the parameters as a
    fixed number and some other cases I need to read the number of copies from
    record set , can you give me hint about doing that

    - also when skip = 0 nothing is printing , in case the print will begin from
    the begin of the page, any idea ?

    thanks

  • edited September 2006
    Hi Isaac,

    My suggestion would be to change the number of copies (FCopies) every time
    the data is traversed. You could possibly use the
    DetailPipeline.BeforePrint event to determine when this is occuring.

    You will need to add some logic to your RAP code to specifically handle 0
    copies. Perhaps something like the following..

    if (FCopies > 1) then
    begin
    //perform copy operations.
    end
    else
    //generate the report without alterations.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2006
    Hi Nico,
    about skip I will use if branch
    but I really can not understand the code I think there is an error on the
    equation of using fskip when it equal 0

    about FCopies
    in the case I read the quantity from record set it will be different for
    each item , not all the items has the same quantity
    what is DetailPipeline.BeforePrint ?
    I have only ppDBPipeline1 , do you think onTraversal will help me,
    but this is not the solution was in my mind I was thinking it must be a RAP
    solution for this, do you know it?

    thanks
  • edited September 2006
    plz any reply about reading fcopies from record set
    thanks
  • edited September 2006
    I can not print from the top of the page when fskip = 0
    I tried alot !! also I can not get fcopies to work dynamically there is no
    debuger in RAP so I can test any thing
  • edited September 2006
    If you look at the example, the code inside the Detail.BeforePrint event is
    setting the DetailBand.BandsPerRecord property to the FCopies value. In my
    testing with the example, setting the FCopies to 0 works correctly. What
    are you doing different than the example? Also, it is possible to access
    your dataset from this event and assign the FCopes value to a record in your
    dataset.

    I would suggest perhaps getting this to work initially in Delphi so you can
    debug your custom code, then move it to RAP using the example as a tempate.

    --
    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.