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

Mail Merge

edited November 2001 in General
I'm looking for ideas in handling a problem I'm trying to solve. Let me
explain. I write school administration software... and one of the functions
required is to generate attendance letters. Most the the letter is straight
forward... the letters are rich text documents defined by the user with the
appropriate insertion codes :

... ....
.... , etc...

The rich text documents are stored in a database... and I pull the
appropriate "letter" based upon the number of absences/tardies, etc. For
the most part I'm able to generate the letters with the mail merge functions
of the ppRichText component; however, there is also the need to have an
insertion code something like: which would be a "report of
absences"... a type of sub-report within the rich text document... up to10
or 15 lines of formatted text... placed anywhere within the body of the
letter as desired by the user. I realize I can have 2 ppRichText components
with a sub-report placed between the two ppRichText components... but I'm
hoping to have the user "define" one letter with all of the insertion codes
in the same rich text document.... and, of course, I'm trying to make it as
simple as possible...

It appears that additional functionality in the future might require several
sub-reports in the defined letter... maybe ,
or , etc..... in other words the user may define a letter
with many embedded sub-reports. Any suggestions and pointers you might
give would be greatly appreciated.

Joe Hutchins

Comments

  • edited November 2001
    Joe,

    Could you not use a mail merge field from a db memo text field? So, your report
    would have static and variable text mixed. If a condition is met, the table with
    the variable text field will have some text to insert into the mail merge
    document.

    I do a similar thing, but I also use the RBAddons to make it easier. These
    components have settings for adding lines, spaces if there is text, or none when
    null.

    Good luck,

    John


    Static text

    variable text, (from memo field of linked table)

    static text

    etc.

    Obviously, the variable text can't push the remaining text off of the page.


  • edited November 2001
    John,

    I appreciate your input... I thought I had tried this before and it wouldn't
    work... after you comments I "re-tried" the memo field (I'm using the
    kbmMemTable component to build my merge file)... and now it is working... I
    don't know why I couldn't get it working before. I also have licensed
    RBAddons... I just need to figure out how to use them (in my spare time).
    :o)

    Thanks for your help.

    Joe


  • edited November 2001
    Joe,

    Glad to hear it worked out!

    On the RBAddons...yes, I would recommend that you take the time to work with
    them. They are great for exactly what you are currently doing.

    Good luck,

    John

This discussion has been closed.