<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I've been discussing this a while ago and now I really need to move forward with this.</div><div><br></div><div>I need to be able to select the RETURN columns in a drillthrough mdx (especially multiple measures) in olap4j.</div><div><br></div><div>the mondrian.olap.DrillThrough already supports the syntax for RETURN but it seems like its completely ignored by mondrian.</div><div><br></div><div>basically i need to be able to execute something like:</div><div><br></div><div><div>DRILLTHROUGH MAXROWS 5 </div><div>SELECT ({[Gender].[F]} * {[Marital Status].[M]}) ON COLUMNS</div><div>FROM [Sales]</div><div> RETURN</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[Measures].[Profit Growth], </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[Measures].[Customer Count], </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>[Gender].[Gender]</div></div><div><br></div><div>so my issues are:</div><div>1) At the moment mondrian seems to execute this query but then ignore the return list completely.</div><div>2) Also when i have multiple measures in the return list i get a parser exception, although this should be possible according to SSAS (<a href="http://msdn.microsoft.com/en-us/library/ms345125(v=sql.90).aspx">http://msdn.microsoft.com/en-us/library/ms345125%28v=sql.90%29.aspx</a>)</div><div><br></div><div>I know that tab fields is deprecated but I think it would be a good idea to implement this in a similar fashion</div><div>When the drill through SQL is generated and there is a list of RETURN columns, translate the members in that list to column names and put those in the SQL select.</div><div><br></div><div>Maybe it would be enough to add to MondrianOlap4jStatement. java line 93 : <span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">cell.drillThroughInternal() t</span>he following for the tabfields parameter:</div><div><br></div><div>convertToTabFields(drillthrough.getReturnList())</div><div><br></div><div>now in that method we only need to convert the measures / levels into sql</div><div>I understand we can just use the level key and for measures I'm not so sure.</div><div><br></div><div>I'm happy to implement this if I can get a few pointers!</div><div><br></div><div>Thanks!</div><div><br></div><div>-Paul</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></body></html>