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

RichText does not print

edited November 2001 in General
-------- RichText does not print ----------

I've got 2 RichText components on the Detail Band.
They both appear in the Preview. However, they don't print out.

The report fits on Page 1.

Each RichText has Stretch = True and the Detail Band's
PrintHeight = phDynamic.

Any ideas why the Rich text doesn't print on the page?


Regards, Peter Evans

Comments

  • edited November 2001
    Try settin the Richtext component's Transparent property to False. Many
    printer drivers don't support transparency.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001


    I checked my settings and I had Transparent = False. I switched
    it to Transparent = True but that didn't work either.

    I decided to try the example in the 'Developer's Guide'. That example loads
    a
    rich text file. Success.

    So it had nothing to do with printers or drivers.

    I was using memory streams to load the rich text ::-
    RichTextStuff.LoadFromRTFStream(MyMemoryStream);

    I took a punt that ReportBuilder is a two pass system and coded ::-

    RichTextStuff.LoadFromRTFStream(MyMemoryStream);
    MyMemoryStream.Position := 0; {reset to beginning}

    The printed output appeared!

    I doubled checked the documentation on TppRichText Component and
    LoadFromRTFStream.
    Unfortunately they do not mention this tip...


    Regards, Peter Evans
  • edited November 2001
    Glad to hear it is working. There is a code sample in the techtips
    newsgroup in the richtext thread, which uses an intermediate memory stream
    to load richtext.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited November 2001


    Thank you, I found the articles.
    Regards, Peter Evans
This discussion has been closed.