dbTalk Databases Forums  

Font Colour

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


Discuss Font Colour in the microsoft.public.sqlserver.olap forum.



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

Default Font Colour - 04-13-2005 , 10:46 PM






Dear all,

I would like to add color to the value of calculated member. When the value
is positive, the color is black. When the value is negative, the color is
red. I put the following code in calculated member's property (ForeColor),

iif([Measures].[Discount%]>0,rgb(0,0,0),rgb(255,0,0))

It only works in data view of cube editor. However, nothing happen in Pivot
Table of Excel. How can I change the color of the font by writing the MDX?

Thanks a lot!

Polly

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

Default Re: Font Colour - 04-13-2005 , 11:00 PM






This is possible with OWC, or using Excel add-ins:

http://groups-beta.google.com/group/...rver.olap/msg/
aa1ff98ef9cc6385
Quote:
Newsgroups: microsoft.public.sqlserver.olap
From: Deepak Puri <deepak_p... (AT) progressive (DOT) com>Date: Mon, 11 Apr 2005
14:00:41 -0700

Subject: Re: Conditional format and computed measures
...
Excel alone may not support server-side formatting. But Office Web
Component (OWC) Pivot Tables support it:

http://support.microsoft.com/d*efaul...;en-us;3181*22

INFO: Using Analysis Server Format Properties with the Office XP
PivotTable Component

SUMMARY

The Microsoft Office XP PivotTable component supports two undocumented
properties: UseProviderFormatting and DisplayCellColor. These properties
allow you to use server formatting for cells and totals in a PivotTable
view.

• When you set the UseProviderFormatting property to True, the
PivotTable component applies number formats that are stored on the
server to the totals that appear in the PivotTable view. The default
setting for this property is False.

• When you set the DisplayCellColor property to True, the PivotTable
component applies Forecolor and Backcolor settings that are stored on
the server to the cells that appear in the PivotTable view. The default
setting for this property is False.

• The PivotTable component does not support other format properties that
can be set on the server, such as FontName, FontSize, and FontFlags.

NOTE: The UseProviderFormatting and DisplayCellColor properties are
hidden members in the Microsoft Office XP Web Components object model.
These members are not documented and, therefore, these members are not
supported by Microsoft Technical Support. The sample code in this
article is provided "as-is."
..

There are Excel OLAP Add-Ins, including from Microsoft:

http://www.microsoft.com/offic*e/sol...cel*addin/over
vi
ew.mspx
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


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.