Hi Dragan,
Thanks a lot for your response. Actually, I satisfyed with Report solution, so I didn't try memlines, etc. But I'll put this in my mind.
Thanks again.
In Report DE I put some table, so it works just fine.
>>1) Datetime appears with gray background
>>2) I can not print a string>255 character long, so I need to do this:
>>@ prow(),5 say substr(thisform.message,1,250)
>>@ prow(),pcol() say substr(thisform.message,251)
>>
>>And major problem - instead of chr(13) - return I have some symbol...
>>What could you suggest? May be using a report is easiest solution here? I've already changed to report, but in this case I need to use some table, even if I don't print anything from this table...
>
>You can create a report which wouldn't use any tables, but you still need at least one dummy cursor with one record to be able to run it, because the Report Form command has a range clause, i.e. it is assumed to be done over a workarea which has something open.
>
>As for printing longer strings, the 255 char limit is inherent to VFP's print engine; I have had trouble with expressions which returned more than that, or longer memos. Your solution is OK for one line; here's how I'd go to print it into a column:
>
>set memo to < your max width of column goes here >
>for i=1 to memlines(thisform.message)
> @prow()+1, 5 say mline(thisform.message, i)
>endfor
>
>Sorry, can't try your code with a printer, I write these messages at home, no printer at hand.
The problem was more than that. My form.Message is a string, which contains itself chr(13), like this:
Part1+chr(13)+Part2+chr(13)+... I want to display it correctly and print it.
If I print it from report, it prints just fine, but if I use @..say command instead of correct printing I see some symbol...
So, I decided not to use this code...
If it's not broken, fix it until it is.
My Blog