Wednesday, April 9, 2008

Using Flex OLAP/OLAPDataGrid for doing Pivoting computations

Satish has developed a new PivotComponent using OLAPDataGrid and OLAP which can be used to perform pivot analysis of data.

The sample can be found here. Drag and drop one or more dimensions into the column and row fields. The results would get displayed as soon as the drop happens. Drag and drop more dimensions into column, row or slicer fields. Use the drop down attached to dimension button to pick specific members of the dimension to do slicing. The sample uses OLAPChart and OLAPDataGrid extensions to display the OLAPResult generated.

Description and source

21 comments:

Madhav said...

Hi Sreenivas,

I'm new to Flex technology. I was looking for OLAPDataGrid examples.

All the examples related to OLAPDataGrid have inline data. Could you point me to any example where data is obtained from some HTTPService or Web Service?

Thanks,
Madhav

Sreenivas said...

Use any webservice or HTTPService which returns XML or Object data and feed it. It should just work.

You can take a look at WebService and HTTPService help (or internet)for samples on who to configure one to get the data. The samples might show how to feed data into a DataGrid. The same data can be fed into OLAP (as long as it is flat and not hierarchical).

Madhav said...

Hi Sreenivas,

Thanks for such a quick help!

Actually I wanted to use a result returned from an OLAP server (in XML/A format)in an OLAPDataGrid.

Does, it mean that I've to write an 'adaptor' to convert the XML/A response to flatdata format?

Also, is there any example of direct implementation of IOLAPResult interface? It looks like the source code of classes/interfaces in mx.olap package are not available in the latest Flex Builder.

Thanks,
Madhav

Sreenivas said...

You can read the article on XMLA interface with OLAP here.

http://nisheet.wordpress.com/2007/10/30/presenting-flex-analysis-services-bridge/

The source for all the OLPA classes etc should be available as mentioned in one of my posts.

Rahul said...

Hi Sreenivas,

I am new to the flex world. Can you please help me out on how to create dimensions and measures for OLAP datagrid on the fly? What I am trying to achieve is drag a dimension from the list and drop it over the OLAP datagrid. Something very similar to what Satish has developed.

Thanks in advance,
Rahul

Sreenivas said...

I don't think I can help any more than asking you to take a look at or use Satish code.

Rahul said...

Hi Sreenivas,

I cant use Satish code since my requirements are bit different, so I have to code it from the scratch. No worries for that, Now I have the code for craeting dimensions and measures on the fly. Last thing can you please confirm "flex-analysis-services-bridge" works only with the enterprise edition?

Sreenivas said...

I cannot comment on it as I was not invovled with it. You can try posting a comment on that blog.

Almost Newbie said...

i had used this pivotcomponent and successful to retrieve data from sql server 2005. my problem is how to export all data shown with olapgrid to excel?

thanks,
Kurniawan

shawqi said...

Hi,
Any Idea how can I add item renderer to the component ,
I found some inpormation at Adobe help (http://livedocs.adobe.com/flex/3/html/help.html?content=olapdatagrid_9.html) but i was not able to implement it at this component as it all dynamic.

crorella said...

Hi,

I'm using a xmla bridge to get the data of the cube, do you know how can I feed the Pivot Component with the result of the query?.
The result is a IOLAPResult, but the PivotComponent expects a ICollectionView as datasource.

Thanks.

MENDONÇA said...

HELLO ..
Can you give me a help on how to format the decimal values for this component because if you use the procedure of Adobe does not work, ja olapchart in class I got the problem is the grid ... you could help me or pass the email from Satish TJ
Thanks;;;;
vagnerdz8@gmail.com

Sreenivas said...

If you can post a sample which is not working I can see if I can help. I think Satish is no longer working on those components and may not be available to help.

MENDONÇA said...

Two questions about this pivotcomponent, he is free to develop and market?
And the formatting (currency Formatter, Formatter number) to decimal in the OLAP grid can not format the values to two decimal places for example ".. 1,000,00 you can help me? How can I ensure that this component is free to customize ... . thanks

Sreenivas said...

The posted source code is free and you can customize it your liking.

You can play around with OLAPCell.as code and get the formatting you like.

MENDONÇA said...

You could give me an example of how to use olapcell to format this value to 2 decimal places ... thanks

Sreenivas said...

I have posted the response here. Let me know if that doesn't work.

Sreenivas said...

crorella : Sorry I missed your reading your comment. You need to feed the IOLAPResult directly to the inner controls like OLAPChart and ODG extended classes as you have the result already.

Unknown said...

Hi Sreenivas,

Nice sample. But I think OLAPDataGrid is too slow. We recently integrated a OLAP component developed in pure AS3 from http://www.flexmonster.com and it works much faster.

Thank,
Roman

Unknown said...

@Roman
And more expensive.....

trailmarky said...

whoa!!!, you had a passion in blogging, thumbs up for your work of love.. Hehe very inspiring ideas,


anyway I'm william
mind if I put a link back to you?


(clickable) ------> Suit