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

Color whole field in a report regardless of length of text in field 1

Status
Not open for further replies.

CJMK

Programmer
Jul 2, 2014
30
US
Making badges for a conference (US Go Congress)
I want the person's name on the top with a color background extending all the way across the badge.
Ideally with the name centered, but that's hard in a proportional font (Using ariel)
If the reporter sees spaces, it stops printing the color.
I can add a character at the end, but the proportional font creates different length on the report.
I would be willing to print from the left, but the same problem on color filling the whole field.
Color is coded for player strength status (4 colors using different print when specs)
Ideally would like to fill with non printing character but will use a period or dash if necessary.
TIA
 
This should be no problem.

First, stretch the field so that it occupies the entire width of the report. Then, in the Field Properties:

- Set Backstyle to Opaque (on the Style tab)

- Untick "Use default background color" (also Style tab)

- Click the "three dots" button next to the "Use default background color" checkbox, and choose the required colour.

- On the Format tab, select "Center" under "Alignment.

Then close the properties and run the report.

It works for me. If it doesn't do what you want, come bzck.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I just noticed that you also want to apply a different colour depending on the player's status.

I was going to suggest that you do that from the Dynamics tab. But, as far as I can see, that would only allow you to choose between two mutually-exclusive options, rather than the four that you want. If that's right, I guess the only way would be to create four fields, each overlayed on the other, and to use Print When to choose between them.

Unless anyone has a better suggestion.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Started this earlier but lost track of it.
I did as you suggest already. Nice to know I was on track for once. I attach a screenshot of the result. And yes, am using multiple fields with appropriate print whens to control what shows for whom. The issue is that because of the proportional font (apparently) the color bar only goes as far as the name. Previously, I have not color coded the name, so this isn't a critical issue, more like curiosity in case I do need it at some point. So, don't spend a lot of effort on this.
As always -- much appreciation for your continuing support of the community. I enjoy reading stuff from other folks too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top