You need to create a VB dll function that accepts a STRING parameter
and returns a STRING
Create a new calculated member in MSAS, notice the button "REGISTER"
in the window when creating the calc mbr. Your DLL should be compiled
and you need to ADD that DLL. The DLL will be associated with the
entire cube not just that calc mbr. I dont know why MS did this.
Your VB dll function should return a string that contains MDX and you
then have to use MSAS function "strtoset", or "strtomember" to convert
it so MSAS understands the string
--Calculated Mbr--
Name: CalcMbr1
strtoset(MyNewFunction("Time.1998")) <-- Your parameter needs to be a
string
** This will return a set, not a numeric value, you can do this in
order to see the set
settostr(strtoset(MyNewFunction("Time.1998")))
--VB--
Public Function MyNewFunction(ByVal sMember as string) As String
Dim sNewMember as string
sNewMember = sMember + ".children"
MyNewFunction = sNewMember
End FUnction
Hope this helps
Justin
"Maersa" <ma_ersa (AT) hotmail (DOT) com> wrote
Quote:
Hi All,
what are the procedure in writing an external method/function that can be
used in an MDX query.
thanks, |