dbTalk Databases Forums  

Writing a description for a calculated measure?

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


Discuss Writing a description for a calculated measure? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jéjé
 
Posts: n/a

Default Writing a description for a calculated measure? - 12-07-2004 , 03:29 PM






Hi,

does it possible to write a description for a calculated measure like I can
for a standard measure?

thanks.

Jerome.



Reply With Quote
  #2  
Old   
Dan Reving
 
Posts: n/a

Default Re: Writing a description for a calculated measure? - 12-08-2004 , 05:56 AM






Hi Jerome

In the DSO object model a calculated member (which is a "command" in the DSO
terminology) has a description property.

The property isn't exposed in Analysis Manager, however (I don't know why!).

You need to write some kind of a program (e.g. VbScript, Visual Studio...)
to make a calculated member (a "command" as it is) with a description, or
you can make the calculated member in Analysis Manager and then apply a
description to it with a program.

If you are not experienced with DSO, I would recommend the latter.

It could look something like this (VBScript):

Dim DSOServer, DSOdb, DSOCube, DSOCommand

Set DSOServer = CreateObject("DSO.Server") ' Create the DSO server object
DSOServer.Connect "YourServername" ' Connect to your server

Set DSOdb = DSOServer.MDStores("Your databasename") ' Access your database
Set DSOCube = DSOdb.MDStores("Your cubename") ' Access your cube

Set DSOCommand = DSOCube.Commands("Your calculated member") ' Access your
calculated member

DSOCommand.Description = "Your description" ' Set the desired description

DSOCube.Update ' Write back to the repository

' Clean up
Set DSOCube = Nothing
Set DSODb = Nothing
DSOServer.CloseServer
Set DSOServer = Nothing


You could use the Wscript.Arguments collection to parameterize the script
and call from a bat/cmd-file.

Obviously you need something simular, when you want to see the descriptions!

Best regards
Dan Reving

"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> skrev i en meddelelse
news:OUyC6NK3EHA.3908 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Quote:
Hi,

does it possible to write a description for a calculated measure like I
can
for a standard measure?

thanks.

Jerome.





Reply With Quote
  #3  
Old   
Jéjé
 
Posts: n/a

Default Re: Writing a description for a calculated measure? - 12-08-2004 , 08:25 AM



Does a custom add-in can solve this lack of functionality?

"Dan Reving" <dan.reving (AT) magasin (DOT) dknospam> wrote

Quote:
Hi Jerome

In the DSO object model a calculated member (which is a "command" in the
DSO
terminology) has a description property.

The property isn't exposed in Analysis Manager, however (I don't know
why!).

You need to write some kind of a program (e.g. VbScript, Visual Studio...)
to make a calculated member (a "command" as it is) with a description, or
you can make the calculated member in Analysis Manager and then apply a
description to it with a program.

If you are not experienced with DSO, I would recommend the latter.

It could look something like this (VBScript):

Dim DSOServer, DSOdb, DSOCube, DSOCommand

Set DSOServer = CreateObject("DSO.Server") ' Create the DSO server object
DSOServer.Connect "YourServername" ' Connect to your server

Set DSOdb = DSOServer.MDStores("Your databasename") ' Access your database
Set DSOCube = DSOdb.MDStores("Your cubename") ' Access your cube

Set DSOCommand = DSOCube.Commands("Your calculated member") ' Access your
calculated member

DSOCommand.Description = "Your description" ' Set the desired description

DSOCube.Update ' Write back to the repository

' Clean up
Set DSOCube = Nothing
Set DSODb = Nothing
DSOServer.CloseServer
Set DSOServer = Nothing


You could use the Wscript.Arguments collection to parameterize the script
and call from a bat/cmd-file.

Obviously you need something simular, when you want to see the
descriptions!

Best regards
Dan Reving

"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> skrev i en meddelelse
news:OUyC6NK3EHA.3908 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi,

does it possible to write a description for a calculated measure like I
can
for a standard measure?

thanks.

Jerome.







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.