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

Conditional bolding 2

Status
Not open for further replies.

drpep

Technical User
Dec 1, 2000
12
US
I writing a report whose default is bold type. In my report I have an IIF statement and if the result is true, I want this part of the report not to be in bold type.
 
The quickest way is to overlap filed with another field. FieldA Bold Print When condition .T.
FieldB Regular Print When condition .F.

I know it is a pain. But it does work.
-Pete
 
Thanks, Pete, for your quick response. I am not familiar with the technique that your recommending, if you have time, please expand on your solution. Thanks again.
 
Hi, drpep.

BlindPete's suggestion states that you need two textboxes: one bold, the other normal. The following steps are a detailed explanation of how to accomplish this.

#Try This
a) Open up your report and double-click on the affected textbox. I am assuming that this textbox is already in bold.
b) Click the "Print When" button. You should see a "Print When" dialog form appear.
c) At the bottom of the dialog form, there should be a textbox labelled "Print only when expression is true". Type in your iif statement there. Be sure that it will put out a true when you want bold and false if you don't. (Remember: this is the bold textbox.)
d) Close the "Print When" dialog form and then close the "Report Expression" dialog form.
e) Click on the affected textbox and copy it (using ctrl-c).
f) Paste a copy onto the report (using ctrl-v).
g) Click on the new textbox and position it so that it covers the original textbox.
h) With the new textbox selected, go to the Format menu and click the Font menu item.
i) Select the regular font style and click the font dialog form.
j) Double-click the new textbox and click the "Print When" button. You should see the original iif statement in the "Print only when expression is true" textbox.
k) Modify the expression to put out a true if you want normal and false if you want bold. (Remember: this is the normal textbox.)

Bye. -e2
 
Like he said ;-)

The only thing I would add is that depending on which edge the text box is justified with (left or right) I make one textbox slightly larger (say 6 pixels). I can click on it to edit it more easily this way. So if my overlapping textboxes are right justified. I make one slightly wider and move it to the left. Then I send the wider text box to the back. This way you can click on and edit either one more easily.

I'm hoping in future VFP report writers we'll have on the fly formating capability. One day perhaps...
-Pete
 
You are most assuredly a gentleman and FoxPro scholar. Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top