Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

D7 Memo to Rave Memo Help

gmadisongmadison Posts: 13Member
I have a text memo created in my D7 application that I need to copy to a Memo component in Rave Reports. The memo in D7 has spaces between paragraphs that I need to maintain in the Rave report and it may need to spill over to a second page. Can anyone help me on code that would copy the D7 memo contents to the Rave memo contents? Thanks in advance.
GM

Comments

  • gmadisongmadison Posts: 13Member
    : I have a text memo created in my D7 application that I need to copy to a Memo component in Rave Reports. The memo in D7 has spaces between paragraphs that I need to maintain in the Rave report and it may need to spill over to a second page. Can anyone help me on code that would copy the D7 memo contents to the Rave memo contents? Thanks in advance.
    : GM
    :
    Followup to my initial question: I've received an e-mail with the following code which is supposed to move the D7 memo contents to the rave memo

    var MyPage : TRavePage;
    MyMemo : TRaveMemo;
    Buffer : PChar;
    begin
    with RvProject1.ProjMan do begin
    MyPage := FindRaveComponent('Report1.Page1',nil) as TRavePage;
    MyMemo := FindRaveComponent('Memo1',MyPage) as TRaveMemo;
    GetMem(Buffer,Length(Memo1.Text)+1);
    StrCopy(Buffer, PChar(Memo1.Text));
    MyMemo.Text := Buffer;
    FreeMem(Buffer);
    end;
    RvProject1.ExecuteReport('Report1);

    Everything works fine up to the MyMemo.Text:=Buffer. Here I get an Access Violation. Anyone know why? Do I need to include one of the DataConnections to get the code to work? Any input from someone who can get the code to work would be really great.
    GM
Sign In or Register to comment.