on 03-24-2009 5:20 AM
Hi,
I want to know how to sign a summary field with some colors.
For example,I made a report about every itemgroup's sales in each client.So I made two groups,the first is client,and the other is itemgroup,the sales is the summary field,I want to format the max sales values with red colors in the every client group,but the function maxium can not support the summary field,how can I do? Thanks.
thanks for your reply.I'll use this method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this
right click on summary field and go to format field>font>click on X+2 corresponds to color and write the condition like this
if CurrentFieldValue=Maximum(,) then crred else crnocolor Do the same for the other group like this if CurrentFieldValue=Maximum(,{Item Group}) then
crred
else
crnocolor
Regards,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all replies.
I had try all of your answers.
1.The formula:maximum(, )) and maximum(, )) all can only get the max values in detail section.
2.The formula:maximum(sum(, {item group}), ) :maximum can not support the field summarized.
I only have to use "group sort expert" to sort the sales on itemgroup,it can get the descending sort,so the max sales in every itemgroup and client will rank the first.Though this way can meet the requirement,it can not clearly marked.
If you know that the first record in the group is the maximum, you can use that fact to set the font color. Try a formula like this (basic syntax):
global clientMax as number
if {client} <> previousvalue({client}) then ' New Client group
clientMax = {sales}
end if
if {sales} = clientMax then ' Make all sales values equal to the max RED (could be mult rows)
formula = crRed
else
formula = crBlack
end if
And use a similar formula for item group maximum.
HTH,
Carl
P.S., I didn't think maximum(sum(, , ) would work, but it was worth a shot...
Hi,,
I think i am not sure abt that
One feature is right click on field and highlight expert you can even apply condition here.
or else the same
Regards,
Neo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I dont get what you want actually, I hope you want the following solution.
Right click on the Field, go to Fonts, Click on X-2 (formula icon) in color section, write the needed formula.
If true then crRed else crBlack....
I have one doubt though, which field you are going to compare with the summary field?
Can you please elobrate more on this if it doesn't help?
Thanks
-Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry,maybe I didn't express my meaning clearly.
For example,there are two client(A,B),we have three itemgroup(AA,BB,CC),I want to make a report total sales on every itemgroup in every client,and sign the max itemgroup's sales in every client.
The report like these:
client itemgroup sales
A
AA 1000
BB 200
CC 9000 -
max sign
B
AA 1200
BB 10000
CC 20000 -
max sign
the sales field is a summary field,because this report is based on a detail data resource,I only suppressed the detail section.
So if I use highlight,the sales will according to the same principle that I set in the highlight,I can not sign them in every group.
You could use a Database Command as your data source, and aggregate the sales per item group in the command, so the command returns client, item group, and total sales per client/item group.
Then, in the Font Color (or background color) formula, use (basic syntax):
if {sales} = maximum({sales}, {client})) then
formula = crRed
else
formula = crBlack
end if
(Another thought I had using the detail data, but I'm not sure it'll work, is to use
if {sales} = maximum(sum({sales}, {item group}), {client})
formula = crRed
else
formula = crBlack
end if
I don't know if you can nest aggregates, though...)
HTH,
Carl
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.