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

Report formatting question 2

Status
Not open for further replies.

ACCESSDUMMY

Programmer
Oct 22, 2003
33
US
I need to somehow format my report so that the data that contains a negative number will be shaded in grey. I have a table in the report which contains columns of currency. It has been requested to me that I shade the negative numbers so they stand out on the report. Is there a way to do this in Paradox?

Thanks,
Amy
 
Amy,

In general, this isn't something that Paradox provides a great deal of built-in support, but you can combine calculated fields with some creative design to pull it off in a limited fashion.

The basic technique requires three field objects:

1. The first is bound to the field in question and is formatted so it doesn't appear on the report. (See for details.)

Name this field object and be sure to keep track of the name; you'll use it in the next two field objects.

2. The second is a calculated field formatted in the way you want positive numbers to appear. It's calculation is something along the lines of:

Code:
   iif( hiddenField.Value >= 0, hiddenField.Value, "" )

3. The third is a calculated field obejct formatted to display negative numbers. In this case, you'll probably want to set the color of the field object to yellow or some other color that translates to a nice shade of grey when printed. The calulation for this field object should be something to the effect of:

Code:
   iif( hiddenField.Value < 0, hiddenField.Value, &quot;&quot; )

You need to stack all three field objects to get this to work.

Now, this a pain to pull off within the confines of a table frame. For best results in this case, resize the record object and the column containing the data field to much larger dimensions before creating the calculated field objects. This gives you room to use the Clipboard to make copies of the original field object.

It takes a bit of time to set this up, but the results are well worth the effort.

Hope this helps...

-- Lance
 
Lance, has anyone ever told you that you're a genius? :)

That worked like a charm!!!

This website is so helpful. I first found it because I'm trying to learn Access, but my experience is in Paradox. As I've been searching through the Paradox forum, I've noticed that you seem to answer almost everyone's questions. I would like to personally thank you for your responses. I checked out your website too, and I've now got it marked in my &quot;Favorites&quot;.

Thanks again!
Amy
 
Amy,

Thanks for the kind words; I'm glad it helped.

While I don't answer every Paradox question, I do try to help where I can and am pleased when that succeeds.

I'm glad you find the site useful as well. I started it primarily because a lot of the same questions appear over time and, well, there aren't that many sites covering Paradox these days. I'm in the process of trying to get more information online and do use this forum as a way to determine which articles I need on the site.

There are some other Paradox-related sites out there and lists the ones I've found. If you (or anyone else) finds others, I'd appreciate hearing about them via the email address on my profile or one of my site's Feedback links.

That way, we'll continue to grow and evolve the available information and possilby even help convince TPTB that Paradox is alive and well in the user community.

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top