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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MEMO field Edit Box in Form and Report Field 1

Status
Not open for further replies.

foxup

Programmer
Dec 14, 2010
319
0
16
CA
Hi,

Here is the situation. I have a form with an EditBox in it (where the user can enter a description about a problem, which can sometimes be lengthy so I do not want to limit the entry people and entering their data). The data which is entered in the EditBox is saved in a Memo Field (called DESC) in my DBF. Now, I have a nice Report which prints all the data in my dbf. This report is given to my technicians and they go on the road to solve the problem. However, I have a problem with the Report when it gets printed. The report field for DESC is a fixed box so sometimes the actual data entered will get cut off when the report gets printed. Is there any way of put an indicator of some sorts on the report in that field saying the "More Notes In System...) so that the when the print the report, the see there are more notes so they can go in the system and look-up the the order and then view all the notes. You know what I mean?

Any help?


Thanks,
FOXUP!
 
Tick the fieldproperty strech with overflow. Than the field is enlarged depending on required text in memo.
-Bart
 
Have your "More Notes In System ..." print conditionally (Print When) based on:

LEN(ALLTRIM(DESC)) > LEN(myReportfield)


Jim
 
Unfortunately I do not wish for the field to be enlarged as it will end-up being more than 1 page and that's not a good solution. Is there a way of put an indicator of some sorts on the report at the end of that field in the report saying the "Please Verify More Notes In System..." so that the when the print the report, the see there are more notes so they can go in the system and look-up the the order and then view all the notes?


Thanks,
FOXUP!
 
Hi FOXUP,

I presume your post is in reply to Nifrabar's solution. Mine doesn't involve enlarging the field on the report.

Jim
 
In the Format property of a report field you can specify a trim mode, since VFP9. For example set this to "Trim to nearest word, append ellipsis". And after the last fitting word the report prints ellipsis ("...") as a sign of the text being longer.

Bye, Olaf.
 
Along with the other good ideas presented above, you can always use a IIF() command in the Expression of your Report Form's Textbox displaying DESC.

Something like:
Code:
IIF(LEN(ALLTRIM(Desc)) < 60,ALLTRIM(Desc),LEFT(Desc,20) + " - Please Verify More Notes In System...")

Good Luck,
JRB-Bldr

 
Hi All,

Wow !!! Thank you for all the feedback. I think, however, I've managed to further complicate things in allowing the user to add anything in the "Description" about the problem. Here is an example of a description exactly:

Customer was ported to us from XX using Telus, Allstream installed new lines and when we ported, x-connect to phone system was not done. All the cabling has already been done, only the x-connect at the demarc is required. Please see if possible tomorrow morning as customer's lines are not working properly and only has his main line working:
5142221111....LCLXXU1639WE300BLCA000 Main
5142221112....LCLXXU1639WQ300BLCA000 Hunt 1
5142221113,...LCLXXU1623DE300BLCA000 Hunt 2
5142221114....LCLXXU176TG3300BLCA000 Hunt 3
5142221115....LCLXXXC3300BLCA000 Fax

We need a technician to come on site to interconnect (rewire our kiosk) to a new location within the same plaza.

We would need them to come either between 4pm-7pm this Thursday October 4th, or early morning (before 10am) Friday October the 5th.

Thank-you,

Brad
ABC Accessories
2665 DDD STREET #A001-901
H3L-1W6
Shopping Plaza
(514) 222-1234


and some notes can be simply like this:

Install cics with 1 card. Connect 4 phones and lines. May need cable for fax line.

I think the Linefeeds/Carriage Returns also cause a problem.

What I have noticed though is that the "Print Report can only hold 5 lines of the memo field. After that it gets chopped. Is there any way of having the Report say "More Notes In System ..." after the Report field displays more that 5 lines. That would help because the user can put some notes, then <Enter><Enter> and then well, the rest gets chopped. I have no control on what the user puts. I have made it more complicated then it should be?

Any other suggestions?

Thanks,
FOXUP!





 
You can always make your own modifications to the suggestion I gave you.

Something like:
Code:
IIF(OCCURS(CHR(13),ALLTRIM(Desc)) <= 5 ,ALLTRIM(Desc),LEFT(ALLTRIM(Desc),AT(CHR(13),ALLTRIM(Desc),4)) + " - Please Verify More Notes In System...")

If that does not work for you, feel free to "play with it" making your code changes as needed.

Good Luck,
JRB-Bldr

 
After talking with reps and figuring out their preferred way, I'm gonna do the "fieldproperty stretch with overflow." as per Nifrabar. I do have another problem howver, becuase I'm doing that, under that memo field in the report I have a rectangle. Now, the rectangle shape gets chopped. I have it on float but the rectangle gets chopped and a new one appears on the next page. I'm OK with the new one appearing, but is there anyway of having it so that if the rectangle gets chopped, not to print since it will print on the next page.

Any help,

Thanks.
FOXUP
 
You should be able to use the Rectangle's PrintWhen expression to prevent the object from being printed.

Just decide what you need to use (Count the Carriage Returns in the TextBox value, etc.) to determine if the Textbox will stretch so far that it will obscure or interfere with the Rectangle.

Good Luck,
JRB-Bldr
 
I don't think the carriage returns really help. Some people can just write 1 long paragraphs of test. So, now, the rectangle uder that meemo field gets printed half and on teh next page, it prints the whole rectangle again. I need it to not print the half rectangle. You know?

Thanks.
FOXUP!
 
I don't know any flag saying "print when fully on the current page", so I think you will have to live with that. But let's see what the others propose.

Bye, Olaf.
 
I don't think the carriage returns really help. Some people can just write 1 long paragraphs of test.

OK, understood, users have a way of defeating any limits we try to put on them.

But you can test for BOTH number of Carriage Returns AND Length of text in your PrintWhen's IIF() expression - and only PrintWhen BOTH are under your max limits.

Good Luck,
JRB-Bldr

 
You can go in directions determining the size of text, but in the end you'll never get to perfection. Most promising would be to make use of a report listener and gain more control about the page rendering. But I still have not done anything with report listeners myself. Report is not my topic at all, there are very few demands from our customers.

You could go a totally different route and automate word or excel for this kind of report. With these two you absolutely have control about the page breaks.

Bye, Olaf.
 
I'm going to go with stretch with overflow." as per Nifrabar. I've "floated" all other items underneath it and that's the best I can do for now. I thank everybody for their time & solutions as well.


Thanks,
FOXUP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top