Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Matrix Subtotal Color Format

Author  Topic 

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-06-27 : 18:30:12
Is there any reason the subtotal cell formatting would work in Development
environment and not on the Server? I have tried several ways to make
negative numbers red and positive numbers black. They all seem to work in
the development environment but when I deploy the report to the server only
the data cells are red - the subtotal cells are still black.

PS: I have two row groups and one column group. The subtotal negatives are
red only when the row groups are collapsed. When expanded they are all black.


Thank you,

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-28 : 03:17:41
didnt understand what you mean by row groups are collapsed. can you elaborate on it a bit more. Also please understand that standard subtotal column of matrix is rendered dynamically from your row columns and it does not physically exist by itself.
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-06-30 : 10:05:42
What I meant about collapsed is when I take out the subtotal then it's red, but when I put the subtotal back in, it's all black. I understand that it doesn't physically exist by itself, but why would it showed data cells red in subtotal when in development, but not in Server?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-30 : 10:50:39
quote:
Originally posted by huynhtl

What I meant about collapsed is when I take out the subtotal then it's red, but when I put the subtotal back in, it's all black. I understand that it doesn't physically exist by itself, but why would it showed data cells red in subtotal when in development, but not in Server?


What was the expression you gave and what were values that appeared in cells?
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-06-30 : 11:28:49
The expression is
=iif(sum(Fields!total_balance.Value) < 0,"red","black")
and the values are
35
-25
15
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-30 : 11:41:44
quote:
Originally posted by huynhtl

The expression is
=iif(sum(Fields!total_balance.Value) < 0,"red","black")
and the values are
35
-25
15



so its coming as expected. then wats the problem?
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-06-30 : 16:29:41
I'm Sorry, I thought you ask what the result is supposed to be.
Problem is when this is being deploy to the Server, the negative doesn't come back red, it come back black.
35
-25
15

result i want :
35
-25
15

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-03 : 04:39:30
quote:
Originally posted by huynhtl

I'm Sorry, I thought you ask what the result is supposed to be.
Problem is when this is being deploy to the Server, the negative doesn't come back red, it come back black.
35
-25
15

result i want :
35
-25
15




is this causing for all the columns in row or only for subtotal?
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-07 : 19:50:26
This causing only for the subtotal. The columns in row are correctly formatted.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-08 : 07:26:07
quote:
Originally posted by huynhtl

This causing only for the subtotal. The columns in row are correctly formatted.


wats the expression thats given for color property now?
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-08 : 11:27:00
Expression is
=iif(sum(fields!reimb.value) <0,"red","black") this is in the detail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-08 : 14:05:35
quote:
Originally posted by huynhtl

Expression is
=iif(sum(fields!reimb.value) <0,"red","black") this is in the detail


just try giving like this
=iif(Inscope("YourDatasetNameHere"),iif(sum(fields!reimb.value) <0,"red","black"),IIF(me.Value<0,"red","black"))
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-08 : 15:40:50
Is there any way to change color for different columns in subtotal?
for example, I have one column call Dollar and the other column call Percentage.
I did a subtotal for these columns, but I want to change color in Dollar to be Blue and Percentage to be Red.
How do I do it?

Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-09 : 01:05:15
quote:
Originally posted by huynhtl

Is there any way to change color for different columns in subtotal?
for example, I have one column call Dollar and the other column call Percentage.
I did a subtotal for these columns, but I want to change color in Dollar to be Blue and Percentage to be Red.
How do I do it?

Thanks


do you mean two grouping subtotals?
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-09 : 10:51:22
Because I have to columns in the subtotals, i have to specified the color expression each individually. This is the code I use:
=iif(inscope("matrix1_columngroup1"),iif(inscope("matrix1_rowgroup1"),"black","black"),iif(inscope("matrix1_rowgroup1"),
"black","blue"))

result from it:
title number % individual total
A 1 .01% 1 .01%
B 2 .02% 2 .02%
C 3 .03% 3 .03%
total 6 .06% 6 100%


The problem i have now is that i use the same code for my other data that deals with dollar, but it doesn't work.
this is the result that came back with same code i use:

title Dollar % individual total
A $15 .01% 1 .01%
B $25 .02% 2 .02%
C $30 .03% 3 .03%
total $70 .06% 6 100%

Can you tell me what changes or do i have to change my codes. I also recreate the matrix and use the same expression, but the result is still the same, all totals are blue.




Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-09 : 13:17:30
THis is fixed. I didn't realize it's case sensitive. Problem Solved. Thanks.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-09 : 13:21:59
quote:
Originally posted by huynhtl

THis is fixed. I didn't realize it's case sensitive. Problem Solved. Thanks.


You're welcome
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-14 : 12:44:05
One more question, this is back to the color changing for negative and positive. I'm using the color expression in detail to change color for subtotal, but I still need to have the detail show red if negative and black if positive.
I'm playing around with this expression to change the detail negative or positive, but it doesn't work.
=iif(inscope("matrix1_columngroup1"),iif(inscope("matrix1_rowgroup1")<0,"red","black"),iif(inscope("matrix1_rowgroup1"),
"black","blue"))

Dang it! i've fix one problem, but end up messing up the other.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-14 : 13:21:19
quote:
Originally posted by huynhtl

One more question, this is back to the color changing for negative and positive. I'm using the color expression in detail to change color for subtotal, but I still need to have the detail show red if negative and black if positive.
I'm playing around with this expression to change the detail negative or positive, but it doesn't work.
=iif(inscope("matrix1_columngroup1"),iif(inscope("matrix1_rowgroup1")<0,"red","black"),iif(inscope("matrix1_rowgroup1"),
"black","blue"))

Dang it! i've fix one problem, but end up messing up the other.



if you want the same expression for detail as well why give the condition at all?
Go to Top of Page

huynhtl
Posting Yak Master

107 Posts

Posted - 2008-07-14 : 13:51:09
The reason for the condition is i want people to tell from negative and grandtotal.

This is what I really want: The detail to be red if negative and black if positive and in the subtotal(column and row combine) to be blue so people know that is the grandtotal.

A 1 -.01% 1 .01%
B 2 .02% 2 .02%
C 3 .03% 3 -.03%
total 6 .06% 6 100%

I know there's a way to just use one condition in the color expression to do all of that.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-14 : 14:29:51
use like this

=iif(inscope("matrix1_columngroup1"),iif(expression<0, "red","black"),iif(expression <0 ,"blue","black"))
Go to Top of Page
    Next Page

- Advertisement -