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!

format issue

Status
Not open for further replies.

unknownly

Programmer
Jul 7, 2003
181
US
I have 3 groups in the report and Iam show summarized report on Group 3 footer. IT has drill down to show details.

now I need to change the colour of the group 3 footer( name column on the summarized report) if in detail report if one of the field is null


for example

report looks like this: it is drill downable


id name amt
1 AAA 12
2 BBB 15
3 CCC 50
4 DDD 20


say when I click on name 'CCC' it get details


a/c code AMT

1A CAT 15
2B 20
3A 5
4B DOG 10


I need to change the colour of 'CCC' to red since the code is null in the details.

at the same time i need to change the name to a different colour(Green) if the a/c is keyed in as a parameter but is not filtered by the parameter. A/c parameter is used only to higlight to alter the user to check it.

Any help is appericated.


I have tired to format the Name field with a formual on the font colour but it didn't work.


TIA,
Sweetie
 
have you tried using the Color() function in as a formatting formula?

For example:
if isnull({CCC}) = true then
color(255,0,0) else
color(0,255,0)

 
First create a formula:

//{@null}:
if isnull({table.code}) then 1

Then use a color formatting formula (format field->font->color->x+2) like this:

if sum({@null},{table.group#3field}) > 0 then crRed else
if {table.a/c} = {?A/CParm} then crGreen else
defaultattribute

-LB
 
lbass, Thank you very much.

I can't stop myself from blushing because of my stupidity. :)

I have tired most the same thing as you. but I didn't do the sum({@null},{table.group#3field}) > 0 and instead checking @null > 0. So, gave a try for count but sum really didn't get into my mind...

:)

Thank you again.

Sweetie
 
lbass,

Colour change for the following doesn't work...

if {table.a/c} = {?A/CParm} then crGreen


TIA,
SWeetie
 
That was just a guess on my part. Is there a parameter {?A/CParm}? Can you explain this a little more? This should be part of the same coloring formula though--you didn't split it out, did you?

-LB
 
My user will enter a/c as a parameter. Which Iam not filtering in the report as a parameter instead checking it to see if the a/c from exists for any of the user enter a/c and change the color of the "Name" in the summary report( basically tell user to drill down on that "NAme" for more details.

I did the formula in the same coloring formula. Just as you did advice. Slightly modified it as



Then use a color formatting formula (format field->font->color->x+2) like this:

if sum({@null},{table.group#3field}) > 0 then crRed else
if {table.a/c} = {?A/CParm} then crGreen else
if sum({@null},{table.group#3field}) > 0 and {table.a/c} = {?A/CParm} then
CRBLUE else
crblack





I tested the report for different dates. Looks like its work partially. Like ex:

On report "Name" should show up as Red color because there are null values in the detail which it does.
and I have enter few a/c for a different "NAme" that should have show green but it didn't.

If the "Name" didn't have anf Nulls then the Green colour show up but only for few "NAMes" and skip other which qualify to show up as Green color.


TIA,
Sweetie
 
Again, are you trying to detect ANY a/c in the group that matches the parameter? You'd have to do a similar formula {@a/c}:

if {table.a/c}= {?A/Cparm} then 1

Then change the color formula to:

if sum({@null},{table.group#3field}) > 0 and
sum({@a/c},{table.group#3field}) > 0 then
crBlue else
if sum({@null},{table.group#3field}) > 0 then
crRed else
if sum({@a/c},{table.group#3field}) > 0 then
crGreen else
crblack

-LB
 
Thanks for the reply, I will try your idea again to double check.

lbass, Greetings!

I got this working. I have to use the @null logic for the a/c

@a/c true
if command.a/c = ?a/c then
1 else 0

some how the reguarl sum or count wasn't working...
and create a #rtotal for count of a/c and check #rtotal >0

TIA,
Sweetie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top