Your suggestion did not work as is but a variation of it did. I had to remove the CHR(10) and was able to shorten the third paramater of the AT to just use the 10th occurance of the CR.
Regards, Lou
>>I created a report with report designer. One field is a memo field which can obviously be quite large. I want to limit the number of characters that will print to keep the field from going across multiple pages.
>>
>>If I were printing manually I could use the mline function and a loop to just print the first N lines of the field. But how do I do something similar with report designer running against a table?
>>
>>Regards, Lou
>
>Lou,
>to limit number of lines try this:
>
n_lines = max_lines_to_print
>? IIF(MEMLINES(your_memo)<=n_lines,;
> your_memo,;
> SUBSTR(your_memo,1,AT(CHR(13)+CHR(10),your_memo+IIF(ASC(Right(your_memo,1))=10,'',CHR(13)+CHR(10)),n_lines)))