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

Grouping Mailmerge

edited June 2004 in General
Hi, Can anybody advice me on this, I have dataset in form of grouping.
i.e.
SELECT name, overDue_books FROM Table1
GROUP BY name
ORDER BY name

How can I generate mailmerge report that has header
and footer by using 1 RichText file.

Example of RichText

(header)
Dear ,
You have these books overdue...
...
(list of books)
...
(footer)
Please return ASAP.

Apparently, in my report, if a person have 10 books then
the person will receive 10 mails with/without grouping report.

Please help.

TIA
KKGian

Comments

  • edited June 2004
    Hello,

    Unfortunately the mail merge feature is not sifisticated enough to handle
    this type of letter. This would require a sort of Master-Detail mail merge
    which would be a cool feature for a later release.

    You might try creating two datasets, one containing just the names as the
    master table and the other being exactly the same as the one you describe
    below. Then for each name, traverse the second table manually and place all
    the overdue books into an in-memory object such as a StringList. Finally
    when you need to list the books in the rich text, simply display the text
    inside the StringList.

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2004
    Thanks Nic,
    That's what I've thought in the worse case.

    Anyway, I have voted RBuilder :)

    Cheers
    KK Gian


This discussion has been closed.