Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting when a memo field stretches over into page and beyond on a report

Status
Not open for further replies.

Steve-vfp9user

Programmer
Feb 5, 2013
337
GB
I have a form with a memo field where the user types in text for job proposals.

Is there a way to show when the text being typed extends over on to page 2 and subsequent pages similar to that of Microsft Word when, as you type, if you go beyond page 1 you can clearly see that it's page 2.

VFP9, service pack 2 with Windows 10.

Thank you

Steve
 
often with this approach I choose a fixed width font

Ah, there's the rub. If fixed-pitch fonts are acceptable to the user, then you could use MEMLINES() and SET MEMOWIDTH() to calculate the number of lines in the memo field, and the whole thing would be much easier.

My guess is that users would rebel against fixed-pitch fonts. But maybe not. Perhaps it's just an irrational prejudice on my part.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Sometimes the fixed pitch looks quite distinctive - particularly in an inspection report
and allows the users to create little 'tables' in their narrative where the columns line
up nicely - which is much harder to do in a proportional font.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
All

Many thanks for the posts and apologies for not posting back sooner.

In the end, I added a "Preview" command button to the form so we could see where the text was ending on the page. The other issue which I didn't think about was another field that shows on the report. In other words, we have a free text memo field to type in what you require and also a price field for numeric.

If you use carriage returns to drop the text down in the memo field if it bleeds over onto another page in the report, the price stays relative to the top of the band within the report so you have a gap at the op of the memo field text.

I hope this makes sense but I'll keep looking and when we come up with a solution I'll post it on here.

Appreciate the time and effort on this thread.

Thank you

Steve
 
Steve,
Why don't you paste the text of your price field into the memo field at report time? (In other words, you don't save it in the memo field but you concatenate it to the memo text before providing that to the field in the report form). Then you could avoid that. You could even add it as it's own line, mimic the lable as well lcPrice = "Item Price: $2,132.72" (by creating that string first), then concatenate that to your memo field (you could CR/LF it first there), and then put it on a single field in your report form. Now you don't have shifting fields relative to text amount in the page. (If I understand your issue correctly).



Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top