select line from memo field to print

I have a report with a memo that has many lines, but I want to select only the one that has 'room' in it for printing. I've tried:

[RoomText] ... in the variable window, and code of:

Begin
j := [Query1."Memo1".lines.count]; << errors here, don't know how to count
RoomText := '';
For I := 0 to j
WkText := [Query1."Memo1".Lines];
if Pos('ROOM', Upper(WkText)) > 0 then RoomText := WkText;
end;

So my question is how do I get a single line from a memo field if it contains text I am seeking?

Thanks, sorry the formatting gets lost at post, though.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:44PM
    Hi
    j := [Query1."Memo1".lines.count];
    you cant do this here
    you are confusing the contents of the field with a Fr memo(Text object)
    you can't access it directly.
    ie fieldname j := [Query1."Memo1"] first since it is in a query you would better to and an as operator in your query to give the field another name or create a variable '' notes",in fr and point it to the datafield. it will help to avoid name confusion.
    now databand with an fr memo5(text object) containg variable [notes]
    can be accessed from the obp of the band using memo5.memo.lines[indx].
    or from the script of the memo5.memo itself using memo.lines[indx].
    regards ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.