<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18943"></HEAD>
<BODY><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">I don't know how to do it using the jpivot API, but 
i</FONT></SPAN>f you have access to the mondrian.olap.Result, you can look at 
the dimension of the first member(s) in each row or column.</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">If one of the axes is empty, this method doesn't work; but 
you probably will want to treat that as a special case 
anyway.</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">Result result;</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">Axis rowsAxis = result.getAxes()[0];</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">if (rowsAxis.getPositions.size() == 0) 
return;</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">Position pos0 = 
rowsAxis.getPositions().get(0);</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">for (Member member = pos0) {</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">&nbsp;&nbsp;&nbsp; 
System.out.println(member.getDimension());</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">}</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">// similarly for columns axis...</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">If you're using olap4j it's even simpler. See 
CellSetMetaData.getAxesMetaData. <A 
href="http://www.olap4j.org/api/org/olap4j/CellSetMetaData.html"><FONT size=3 
face="Times New Roman">http://www.olap4j.org/api/org/olap4j/CellSetMetaData.html</FONT></A></FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans">Julian</FONT></SPAN></DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=147163616-14092010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> mondrian-bounces@pentaho.org 
  [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Nitesh 
  Kumar<BR><B>Sent:</B> Monday, September 13, 2010 9:30 PM<BR><B>To:</B> 
  mondrian@pentaho.org<BR><B>Subject:</B> [Mondrian] Identification of dimension 
  in row &amp; columns<BR></FONT><BR></DIV>
  <DIV></DIV>Hi all,<BR><BR>Actually I wanted to make the separate list of 
  dimension of Rows and Columns<BR>. so can any one help me to know that which 
  class/method can give me the<BR>list of dimension on Rows and same for Rows 
  also. like ,<BR><BR>The following code returns you list of total dimension, 
  but I wanted to know<BR>the dimension which are in Rows and 
  Columns.<BR><BR><BR>&nbsp;com.tonbeller.jpivot.navigator.hierarchy.HierarchyNavigator<BR>hn=navigator.getHierarchyNav();<BR>com.tonbeller.jpivot.olap.model.OlapModel 
  om=hn.getOlapModel();<BR>&nbsp; &nbsp; &nbsp; 
  &nbsp;com.tonbeller.jpivot.olap.model.Dimension[] dmn= 
  om.getDimensions();<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp;if(dmn!=null){<BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int i=0;i&lt;dmn.length;i++){<BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp;if(!dmn[i].isMeasure()){<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; 
  &nbsp;if(!listForOnRows.contains(dmn[i].getLabel())){<BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp;listForOnRows.add(dmn[i].getLabel());<BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//out.println(dmn[i].getLabel()+" , 
  ");<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<BR><BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<BR>}<BR><BR clear=all><BR>-- <BR>Thanks 
  &amp; Regards,<BR>Nitesh 
  Kumar<BR>09811-235-725<BR>011-2598-4625<BR>09654291004<BR>09350-739733<BR></BLOCKQUOTE></BODY></HTML>