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

Need to print hugh amounts of text on invoice

Status
Not open for further replies.

manpaul

Technical User
Jan 10, 2005
118
CA
My Client would like to print theh terms and conditions on his invoice.

I am using vfp 9 and would like to know the best way to do this, as a label does not cut it.

The text is about 8 lines in length with a font of 8 so you can see the amount of text to be printed by the report.

Any ideas

Tanks
 

Eight lines are not too many for a regular VFP report to handle.

I guess I would try to put it in a text file, so you wouldn't have to modify the report each time your client wants to change a few words in terms and conditions, then extract it into variable with FILETOSTR(), and make it a field on the report that stretches with overflow.

Can't try it out myself right now, but have a feeling it should work.
 

Manpaul,

Yes, I agree with Stella. It sounds pretty straightforward.

However, you didn't say how you are printing the invoices. Are you using the VFP reporting tool? If so, go with Stell'a suggestion. If not, let us know and we'll suggest an alternative.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks I'll give that a try,

One other question will filetostr() accept cr line feed?
 
Thanks Mike, It works fine,

Now I need to make the first X number of characters Bold can I do this in the expression line Bold(substr(filetostr("name"),1,x)) + substr(filetostr("name,x+1,100000)

 

Now I need to make the first X number of characters Bold

Hmm. That's a bit more difficult. I think you'll have to split the field into two. Place the first x characters in one field, and the remaining characters in the other, and apply the relevant formatting to each.

It would be easier if the bold characters were on a line to themselves -- like in a heading. I don't think you can run the two text fields together. If I'm wrong, someone will correct me.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
I think I'd do FileToString() in the program that calls the report so as to only read the file once. Store the text in a variable. Then, you can break the variable apart as needed in the program to make it ready for the report.

Tamra
 
Another approach could be several textbox controls on your report, one above another, each one containing one paragraph of the text.

Provided the paragraphs are short enough, they could each be set to vertically stretch, and it would all flow nicely.

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top