dbTalk Databases Forums  

assigning different colors to cells

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss assigning different colors to cells in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
asim73
 
Posts: n/a

Default assigning different colors to cells - 08-22-2003 , 10:11 AM







How can I dynamically assign color to cells.



I know I can query the cell propertis in the MDX SELECT but how

can I set the colors of the cells



Asim Naveed


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
mwl
 
Posts: n/a

Default assigning different colors to cells - 08-22-2003 , 03:20 PM






this is from food mart.

WITH
MEMBER [Measures].[Profit] AS
'[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = '$#,###.00', BACK_COLOR = '16776960'
SELECT
{[Measures].[Store Sales], [Measures].[Store Cost],
[Measures].[Profit]} ON COLUMNS,
{DESCENDANTS([Time].[Year].[1997]), DESCENDANTS([Time].
[Year].[1998])} ON ROWS
FROM [Sales]
CELL PROPERTIES [BACK_COLOR]


Quote:
-----Original Message-----

How can I dynamically assign color to cells.



I know I can query the cell propertis in the MDX SELECT
but how

can I set the colors of the cells



Asim Naveed


--
Posted via http://dbforums.com
.


Reply With Quote
  #3  
Old   
mwl
 
Posts: n/a

Default assigning different colors to cells - 08-22-2003 , 03:28 PM



here also is a couple more examples using foodmart.

WITH
MEMBER [Measures].[Profit] AS
'[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = '$#,###.00', BACK_COLOR = '16776960'
SELECT
{[Measures].[Store Sales], [Measures].[Store Cost],
[Measures].[Profit]} ON COLUMNS,
{DESCENDANTS([Time].[Year].[1997]), DESCENDANTS([Time].
[Year].[1998])} ON ROWS
FROM [Sales]
CELL PROPERTIES [VALUE], [FORMATTED_VALUE],
[CELL_ORDINAL], [BACK_COLOR]

WITH
MEMBER [Measures].[Profit] AS
'[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = '$#,###.00', BACK_COLOR = '16776960',
FONT_SIZE = '10'
SELECT
{[Measures].[Store Sales], [Measures].[Store Cost],
[Measures].[Profit]} ON COLUMNS,
{DESCENDANTS([Time].[Year].[1997]), DESCENDANTS([Time].
[Year].[1998])} ON ROWS
FROM [Sales]
CELL PROPERTIES [VALUE], [FORMATTED_VALUE],
[CELL_ORDINAL], [BACK_COLOR], [FONT_SIZE]


Quote:
-----Original Message-----

How can I dynamically assign color to cells.



I know I can query the cell propertis in the MDX SELECT
but how

can I set the colors of the cells



Asim Naveed


--
Posted via http://dbforums.com
.


Reply With Quote
  #4  
Old   
asim73
 
Posts: n/a

Default Re: assigning different colors to cells - 08-24-2003 , 03:24 AM




Thanks to all of you.



But actually what I want is that I can dynamically assigne

different colors to single cell depending on the value of cell.

for e.g if the cell value is less thatn 5000 then show it in RED

otherwise show it in WHITE color.



Also all the examples are using the WITH clause. How can I

assign color to the measure/calculated members stored in the cube.



for example all measures/calculated members will have default

color of WHITE. But when querying, i want to make the color

RED for those cells which have value < 4000, Note that here

I am not creating it in WITH clause.



Thanks,



Asim Naveed.


--
Posted via http://dbforums.com

Reply With Quote
  #5  
Old   
Matt Carroll [MS]
 
Posts: n/a

Default Re: assigning different colors to cells - 08-25-2003 , 01:53 PM



Calculated members that are created using the with syntax can also be
created in the cube using the Analysis Manager UI. Create a the calculated
member and then in the property panel of the cube editor select the advanced
tab and you'll see the ForeColor and BackColor properties. Each of these
properties is an MDX expression that evaluates to a color RGB value.

- Matt Carroll
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"asim73" <member31195 (AT) dbforums (DOT) com> wrote

Quote:
Thanks to all of you.



But actually what I want is that I can dynamically assigne

different colors to single cell depending on the value of cell.

for e.g if the cell value is less thatn 5000 then show it in RED

otherwise show it in WHITE color.



Also all the examples are using the WITH clause. How can I

assign color to the measure/calculated members stored in the cube.



for example all measures/calculated members will have default

color of WHITE. But when querying, i want to make the color

RED for those cells which have value < 4000, Note that here

I am not creating it in WITH clause.



Thanks,



Asim Naveed.


--
Posted via http://dbforums.com



Reply With Quote
  #6  
Old   
Deepak Puri
 
Posts: n/a

Default Re: assigning different colors to cells - 08-25-2003 , 06:33 PM



Check out this March 2001 SQL Server magazine article by Russ Whitney,
entitled: "Setting Display Characteristics". It discusses both
server-side and client-side techniques for conditionally controlling
cell color:

http://www.sqlmag.com/Articles/Index...rticleID=16514


- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.