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!

TEXT JUSTIFY IN REPORT

Status
Not open for further replies.

FEYS

Programmer
Dec 20, 2005
3
MX
Hi, in a report im try to justify text like in word for eg. is it posible ?
 
You can align the text anyway you want. Click on your object or field and then Click on the FORMAT MENU and see a list of options.

If this is not exactly what you want then tell us more.

Don


Don Higgins
 
Don and Tamar, i need full justification in a VFP report

 
Have you thought about sending the report data to Word via automation? Thats a completely different way of doing it but it has worked well for me when I wanted to send the contents of a single record to a Word formatted template.
wjwjr
 
I copied this from another forum that I wrote on the subject of full justification.
me said:
I can only assume that your text will appear on more than one line. It is possible to acheive full (or left or right) justification using a RTF control on your report and send the appropriate "switches" to arrive at what you need.
The justification switches for the justification are

\qc Centered.

\qj Justified.

\ql Left-aligned (the default).

\qr Right-aligned.

\qd Distributed.

Here is an example.

1. Create a blank report, put a textbox on it and stretch it out as much as you need. And save it as rtfdemo (in this case)
2. Use the following code.

CLEAR ALL
CLOSE DATABASES all
LOCAL lcStr
lcstr = "Note that there is a limit of 32 characters total for the sum of text"+;
"before and text after for simple numbering. Multilevel numbering has a limit"+;
"of 64 characters total for the sum of all levels.NOTE: The file must have a"+;
".RTF extension to work properly."+;
"Note that there is a limit of 32 characters total for the sum of text"+;
"before and text after for simple numbering. Multilevel numbering has a limit"+;
"of 64 characters total for the sum of all levels.NOTE: The file must have a"+;
".RTF extension to work properly."
CREATE cursor ctext (lctext m,gText g)
INSERT INTO ctext (lctext) VALUES (lcStr)
_rtfFile = "c:\"+SYS(3)+".rtf"
SCAN
SET TEXTMERGE TO &_rtfFile NOSHOW
SET TEXTMERGE ON
\\{\rtf1\ansi\qj <>}
SET TEXTMERGE TO
APPEND GENERAL gText FROM &_rtfFile CLASS "RICHTEXT.RICHTEXTCTRL.1"
ENDSCAN
REPORT FORM rtfdemo PREVIEW NOCONSOLE

I wrote a piece on the subject (In French) that explain this, you can find it here:



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Tanks for all your comments.. i will try it and i'll let you know later.

Tanks again.

Feys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top