Skip to content

Commit

Permalink
Better usage of the formatter.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@332 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Jul 28, 2010
1 parent b06bcd2 commit d651165
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/org/olap4j/sample/PaloConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.olap4j.OlapStatement;
import org.olap4j.OlapWrapper;
import org.olap4j.driver.xmla.XmlaOlap4jDriver;
import org.olap4j.layout.TraditionalCellSetFormatter;
import org.olap4j.layout.RectangularCellSetFormatter;

/**
* This class demonstrates how to connect the {@link XmlaOlap4jDriver}
Expand Down Expand Up @@ -49,10 +49,14 @@ public static void main(String[] args) throws Exception {
"SELECT {[store].[USA]} ON COLUMNS , {[Account].[1000]} ON ROWS\n"
+ "FROM [Budget]");

TraditionalCellSetFormatter formatter =
new TraditionalCellSetFormatter();
// We use the utility formatter.
RectangularCellSetFormatter formatter =
new RectangularCellSetFormatter(false);

formatter.format(cellSet, new PrintWriter(System.out));
// Print out.
PrintWriter writer = new PrintWriter(System.out);
formatter.format(cellSet, writer);
writer.flush();

statement.close();
connection.close();
Expand Down

0 comments on commit d651165

Please sign in to comment.