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

long files in ppRichText

edited July 2002 in General
hello,
I need some help.

I've created a simple report: One ppRichText shown in three columns, using
the LoafFromFile method.
The files are created from a database in rtf format and could grew up to 2-5
MB. If the file is small no problems. But if the files get bigger only a
part of the text is loading and shown as plain text (because richtext end }
is missing). What can I do to show and print large files in my report ????

Thank you for help in advance.
nobby

Comments

  • edited July 2002
    How is the RichText being loaded? If I am assuming correctly you are loading
    the richtext from the database, writing it to a file, and then loading it
    from the file into ppRichText? Is all the RichText making it from the
    database into the file? If so, then does LoadFromFile load all the text? In
    essence, what I am asking is, when does the partial RichText become lost?

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    Yuo are right: the database writes the file to the harddisk. The file is
    complete correct. You can open it i.e. with word and it looks well. When you
    try to load it to ppRichText only a part of the file appears as plain text.
    In other words: It seems that the file has too much lines, that means
    ppRichText.RichText is limited?????What can I do to work with greater
    files??
    Thanks a lot for answering.
    nobby



    "Alexander Kramnik (Digital Metaphors)" schrieb
  • edited July 2002
    Hi Norbert,

    are you using Win95?

    regards,
    Chris Ueberall;
  • edited July 2002
    Hi Chris,

    we are using win 2000, our customer winXP
    is still the same. Do you have any idea???

    regards,
    nobby


  • edited July 2002
    Hi nobby,


    not in that case, sorry.

    regards,
    Chris Ueberall;
  • edited July 2002
    Try placing a regular richedit component. The try loading the richtext into
    that component the same way you are trying to load it into RBuilder.
    RBuilder's richedit component is built around delphi's RichEdit component.
    You can also try using the RichText engine's available from InfoPower and
    WPTools.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    Hi Alexander,
    I did what you ask me: Place a regular richedit and do the following test:
    With 'RichEdit1.Lines.LoadFromFile' loading the large rtf-file. After
    loading you can see for a part of second formatted rich text and then it
    switches to plain text. But the regular rich edit has a property: MaxLength.
    Set this one to 1000000 and the richedit works fine.
    I did the test with ppRichText too. If there are too many lines the richedit
    switches from formatted to
    plain text. But your comp 'lost' the property MaxLenght. Please help me: Can
    you modify the source that this property appears in the object inspector??
    And prehaps mail the modification to me?? (ppRiched.pas?)
    Many, many thanks in advance.


    3/16/99 - Workaround for bug when assigning streaming a richedit which
    // has exceeded its maxLength. Previously in this case, the
    richedit
    // control would lose the richedit formatting.

    "Alexander Kramnik (Digital Metaphors)" schrieb
  • edited July 2002
    Unfortunately we can't rebuild the design time packages in order to make the
    property appear in the object inspector. However you can modify the source
    by adding 'published MaxLength' to TppRichEdit and either setting it to a
    higher value in the constructor of TppRichText or adding a property to
    TppRichText that will do the same.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited August 2002
    Hi there

    I also have this problem with RichText and long reports.

    I have tried adding MaxLength to the published section of TppRichText &
    TppCustomRichText, but MaxLength does not exist in the base class
    TppStretchable.

    How do I solve this?

    Regards
    Juliana Albertyn
  • edited August 2002
    The MaxLength property is on the RichEdit object (the FRichEdit private
    member of TppRichEdit).

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited August 2002

    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited August 2002
    Hi Bruce

    Please explain!

    I got my long report to print correctly, but it takes very long. I use the
    same code to either print to a text file (bypassing report builder) or print
    a reportbuilder report (ie in one procedure I decide whether to write to a
    text file, or add a line to the richtext component). When writing to a text
    file the report takes 1 min, while a reportbuilder report takes more than 30
    mins. I've timed the iterations, and every nth iteration writing to the
    richtext takes just so much longer.

    Could this be memory related? The report is 58 pages long.

    Thanks to all for the help so far!
    Juliana


  • edited August 2002

This discussion has been closed.