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

Problem putting Address in a Memo

edited April 2002 in General
I have put my Address lines into a Memo instead of the 5 separate fields
which i had before.
This is so i don't get any blank lines in the Address.

This works great, but when i scroll to the next Report, i do not get a new
page starting. I get the new address details added straight after the end of
previous Memo.
If i comment out this code, i get a separate page for each record which is
what i want.
I have put the code for adding the address details in the
ppReport1DetailBanBeforeprint event.

Any ideas what i am doing wrong please ?

Thanks
John

Comments

  • edited April 2002
    Are you manually adding the address fields to the Memo? One option for
    accomplishing this is to use MailMerge with a RichText component. To get a
    new page for every record create a group for the record and enable
    StartNewPage for the group.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002
    Yes, i am adding the address fields manually because i don't want the line
    of the address to print a blank if there is no address for say Address3.
    If i use the MailMerge in a rich text, i would get the same blank if there
    was no value in one of the fields wouldn't i ?
    It is just that when a report prints an address and there is a blank in
    it(because there is no value in the Address 3 field), then it doesn't look
    very good.
    Any other thoughts ?
    I will try to do the grouping thing though...

    Thanks
    John



  • edited April 2002
    I tried creating a Group but as i only have a Memo and a Richedit on the
    Report, i couldn't create a group.
    I'm still stuck for an answer to this problem though.
    Any other thoughts please ?

    John
  • edited April 2002
    You can place a label somewhere on the report (Title band for instance) and
    set it's Visibility to False. Create a group on the label by selecting Break
    On Custom Field rather than Data Field. Then implement the Group's
    OnGetBreakValue event and pass it a different value every time, an integer
    that you increment for instance. This will cause the group to break and go
    to a new page every time.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002

  • edited April 2002
    That's done it :-)
    Thanks for your help.
    It is most appreciated.

    John
  • edited April 2002
    Thanks Bruce, i'll take a look.

    John
This discussion has been closed.