Terry Smith


Given an ADOMD Cellset how do I determine the data type of a cell such as currency, percentage, integer, etc.

I have found no way of doing this other than explicilty looking for percent signs and currency symbols which is an inheritly BAD thing to do. I've looked through the properties arrays as well as tried different DIMENSION PROPERTY settings and have not found a way to retrieve the data types.

Thank you,

Terry





Re: How do I determine a measure's data type in an ADOMD cellset?

Mosha Pasumansky


You are mixing different terms here. Currency and Integer are data types. Percentage, however, is a formatting. Currency also can be viewed as formatting, i.e. you can format integer data type as currency.

Seems like you want to find out the formatting of the cells - you can ask for the FORMAT_STRING cell property to discover how the values of the cells were formatted.







Re: How do I determine a measure's data type in an ADOMD cellset?

Terry Smith

I agree I was mixing terms to an extent, but the basic problem is that anyone visualizing OLAP data in a chart needs to know the type of the data (percentage, currency, integer, etc.) in order to format the axis. Inspecting the already-formatted value or parsing the format string is a very error prone and weak way of arriving at that information.

Terry







Re: How do I determine a measure's data type in an ADOMD cellset?

Mosha Pasumansky

Well, I don't think there is something special about chart or about the fact that this is OLAP data as opposed to, say, SQL data. Data is only meaningful when there is understanding of its semantic, and the info such as whether it is currency or percentage is only a small portion of such semantic. Ultimately somebody needs to know what these numbers mean.

Again, if you want to do something special when data was formatted as 'Currency' or 'Percent' - you can look at FORMAT_STRING cell property.






Re: How do I determine a measure's data type in an ADOMD cellset?

Terry Smith

Yes, "ultimately somebody needs to know what these numbers mean." That is why I'm trying to format the user interface correctly! Contrary to your reply, when looking at values on a chart knowing whether they are amounts or percentages is NOT "only a small portion of such semantic". It's a requirement to build a chart accurately, and any competent programmer would cringe at the thought of parsing a format string to arrive as such metadata. The whole point of OLAP is to interpret data. Having available such basic metadata about that data is not too much to ask. If it's the user's sole responsibility to understand the semantics of data, then why not just give them a text-file dump of the SQL tables

Furthermore, you need to start listening to your users. This applies to every user question and complaint on this forum which you just dismiss in your response out of arrogance. There are a lot of holes in your application and virtually no documentation. You should stop telling everyone they don't know what they're doing, don't need a particular feature, or are obviously doing something wrong.

Thanks for you help and have a happy President's Day,

Terry






Re: How do I determine a measure's data type in an ADOMD cellset?

Mosha Pasumansky

I appologize if I sounded arrogant or created impression that I dismiss user complaints. This certainly was not my intent. I personally do try to listen to the users - this is the main reason why I participate in this forum. I am sorry that it looked the opposite to you and other readers. I will watch my language more carefully.

Thanks,

Mosha.






Re: How do I determine a measure's data type in an ADOMD cellset?

Terry Smith

Thank you Mosha.






Re: How do I determine a measure's data type in an ADOMD cellset?

mmman

I'm iterating through the CellProperties I have in an ADOMD.NET cellset

with

foreach (CellProperty prop in item.ValueCell.CellProperties)
Debug.WriteLine("name:" + prop.Name + " val:" + prop.Value);

There are no format_string properties


I have not explicity defined the format_string in the MDX query.

I still don't know how to get the format_string property