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

How To Control Page Contents in ppMemo

edited April 2004 in General
Hello All:

I am using D5/RB 6.01.

I have a report that contains a ppMemo component.

I have been assigning the data as follows:

ppMemo1.Lines.Assign(Memo1.Lines);

However, I need to control where the page breaks occur. How can I take
the 1st 30 lines in the memo & have them print on page 1, next 25 lines on
page 2, and final 40 lines on page 3 ???

Do I need to place each page into a seperate record in a IN-Memory Table
???

Is there an easier way to accomplish this ???

Thank you.


Neil Huhta

Comments

  • edited April 2004
    Hi Neil,

    Placing the appropriate memo lines inside an in-memory dataset would
    definitely give you the greatest chances of success in creating a report
    like this one. Otherwise you would have to calculate the individual line
    height (based on the font) for each line in the memo, then define each
    page's detail band height according to how many lines of the memo you would
    like printed.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2004
    Nico:

    I think I was not very clear. I know which data goes on page 1 and I
    know that it will fit on page 1, Page2, Page3, etc.

    Knowing that, what RB code, events, etc. are necessary to cause the data
    to print to the pages I designate ???


    Thank you

    Neil Huhta
  • edited April 2004
    Hi Neil,

    If you have each set of lines separated out, it should be relatively easy to
    simply load the text from your dataset into a memo object using the
    DetailBand.BeforePrint event. Either that or you could connect your
    inmemory dataset to a JITPipeline and load the memo text automatically using
    a DBMemo object.

    --
    Best Regards,

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