<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;This module contains functions to display &lt;span class=&quot;caps&quot;&gt;OLAP&lt;/span&gt; cubes using &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; tables. Before you can use these methods, make sure that the module is included as helper module so the methods are available in your views:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
class MyOlapController &amp;lt; ActionController::Base&lt;br /&gt;
  helper ActiveRecord::Olap::TableHelper&lt;br /&gt;
  &amp;#8230;&lt;br /&gt;
end&lt;br /&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;h2&gt;&lt;code&gt;active_olap_table(cube, options = {}, html_options = {})&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Displays the complete cube in a &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; table, using a row for every dimension category combination possible. This method works for cubes with as many dimensions as you like, and it supports multiple aggregate functions, whose results will be displayed in cells next to each other.&lt;/p&gt;
&lt;h3&gt;Parameters&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;&lt;code&gt;cube&lt;/code&gt;&lt;/strong&gt;: The ActiveRecord::Olap::Cube instance that was returns by a call to &lt;code&gt;olap_query&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;code&gt;options&lt;/code&gt;&lt;/strong&gt;: A hash that can be used to control the structure of the resulting table. Currently, no options are supported, so this is reserved for future use.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;code&gt;html_options&lt;/code&gt;&lt;/strong&gt;: A hash with attributes that will be added to the table-tag.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;code&gt;active_olap_matrix(cube, options = {}, html_options = {})&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Displays a two dimensional cube as a table, using the categories of the first dimensions as rows and the categories of the second dimension as columns. Currently, this function only works when only a single aggregate function is used.&lt;/p&gt;
&lt;h3&gt;Parameters&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;&lt;code&gt;cube&lt;/code&gt;&lt;/strong&gt;: The ActiveRecord::Olap::Cube instance that was returns by a call to &lt;code&gt;olap_query&lt;/code&gt;. Note that this function will raise an exception if the cube does not have exactly two dimensions.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;code&gt;options&lt;/code&gt;&lt;/strong&gt;: A hash that can be used to control the structure of the resulting table. Currently, no options are supported, so this is reserved for future use.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;&lt;code&gt;html_options&lt;/code&gt;&lt;/strong&gt;: A hash with attributes that will be added to the table-tag.&lt;/li&gt;
&lt;/ul&gt;</body>
  <created-at type="datetime">2008-08-05T09:15:13-07:00</created-at>
  <id type="integer">42685</id>
  <permalink>activerecord-olap-tablehelper</permalink>
  <repository-id type="integer">37573</repository-id>
  <title>ActiveRecord::Olap::TableHelper</title>
  <updated-at type="datetime">2008-08-05T09:20:49-07:00</updated-at>
  <user-id type="integer">15870</user-id>
</wiki>
