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

Open The Editor of Text of ReportBuild

edited October 2002 in General
Hello

As to open the editor of text of ReportBuild in time of Execution.

ivan

Comments

  • edited October 2002
    Excuse me again for my English.

    On the Editor, it is the Editor of component TppRichText.

    Thank you.
    Ivan


  • edited October 2002
    Do you mean TppDesigner.Showmodal? Make sure that you connect the report to
    the Designer.

    ppDesigner1.Report := ppReport1;
    ppDesigner1.Showmodal;

    I know there is a slight language barrier here. Perhaps you could also post
    your question in you native language (Brazilian) and someone else may be
    able to translate it on this newsgroup or give you a better answer based on
    a better understanding of your problem/question.

    Please examine the Developer'sGuide.pdf included in you installation for
    examples of code. There are also tutorials and examples in the installed
    Delphi$\RBuilder\Demos directory. Run the Report Explorer demos to see the
    end user solution in action.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    Hello Jim.

    Excuse to bad expression, until the momente I already knew of as to arrive
    to the Editor, he/she would only like to know it is had as doing this in
    time of execution, so that the final user can publish its own text.

    Thank you very much

    Ivan




  • edited October 2002
    From the report designer, use the right mouse button click over the richt
    ext control. This should launch a popup menu. You should then be able to
    choose 'Edit' In the Brazilian translation it would be 'Editar'


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    You'll have to write some code that loads their memo rich text to the rich
    text control in the report before the report prints.

    ------------------------------------------------
    Tech Tip: Copy RTF data from TRichEd to TppRichText
    ------------------------------------------------

    You can copy RTF data from Delphi's TRichEd to ReportBuilder's TppRichText
    control by using an intermediate memory stream:



    var
    lRTFStream: TMemoryStream;

    begin

    {create temp memory stream}
    lRTFStream := TMemoryStream.Create;

    {save the TRichEd's rtf data to the memory stream}
    RichEdit1.Lines.SaveToStream(lRTFStream);

    {load the rtf stream to the TppRichText}
    lRTFStream.position := 0;
    ppRichText1.LoadFromRTFStream(lRTFStream);

    {free the memory stream}
    lRTFStream.Free;


    end;


    Note: An alternative method would be to use RichEdit1.Lines.SaveToFile and
    TppRichText.LoadFromFile.



    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.