Grids, Grid Charts, Pivot Grids, and Pivot Grid Charts are available through the Query Analyzer Window as tabs (when enabled in the Main Application Toolbar) for any queries on any database Aqua Data Studio can connect to. Grid Results are the most common method of displaying query results, and they are also the recommended method of displaying large results sets (100,000 rows or more) as memory consumption has been highly optimized. Other features of the Grids Results include sorting, column rearrangement, quick filtering displayed results, aggregate functions on selected cells, Script to Window for Aqua Commands, Save As, View in Excel Viewer, Grid Printing, and Charting. It is also possible to save charts as AquaScripts within AquaProjects by right-clicking on them.
Grid results display data from tables and queries within a grid that can be sorted and rearranged. Column data can be Sorted in descending or ascending order by left-clicking on column headers. If the Control key (CTRL) is pressed during sorting, multiple columns can be sorted in sequence. Resorting columns can also change how the chart displays.
1. Click Header | 2. Rows Sort Ascending or Descending | 3. Control-Click to multiple Column sort |
Columns can be Rearranged left to right by dragging their column headers from one location to another. Resorting columns also changes how the chart displays. Hide and Unhide Table Columns with a right-click in a Grid Results Column Header and choose which Table Columns to display in the Results. This makes it much easier to pare down displayed results without having to change the SQL statement and re-execute.
1. Drag Column Header |
Quickfilter - There is a Quickfilter on the upper right corner of the grid with which you can focus on a particular field and display only those results with matching text or wildcards. To the left of the filter numbers (2/15) indicate the number displayed out of the total number of query results. When you type in the quick filter, an "X" appears at the end of the filter that erases the text entered when it is selected. You can also produce a chart of the filtered data the same way that you produced a chart of the whole block of information. Any charts associated with the results of the query change dynamically based on the filtered results, as shown below. The Quickfilter is also available to narrow down the Fields displayed in the Fields List within Pivot Grid Results.
1. Before Filtering | 2. Typing Quickfilters results |
Aggregate Functions -
Aggregate Functions allow users to calculate Count, Count Numbers, Sum, Min, Max, Average, and Standard Deviation functions on selected cells in the grid data. Once data has been highlighted in the grid, right-click on the Aggregate Functions button at the top right of the grid. Choose the desired function and its results are displayed within the button itself. If the Grid Results Pane is too narrow, the Aggregate functions may collapse into an expandable box adjacent to the quick filter input form. Clicking on the collapsed box displays its contents in an overlay at the top of the grid results. Pivot Grids Results also allow Aggregate Functions on selected data.
Select Data, choose Aggregate Functions |
Pivot Grid Custom Filters
- If your Pivot Grid contains a date field as a Filter Field, then the Custom Filter drop-down for your date field contains a set of conditions that allow you to filter "on" the days of the week.
Pivot Grid Custom Filter | Pivot Grid Custom Filter Days |
The Script to Window menu option automatically generates Aqua Commands for the pivot grid/pivot chart for exporting by right-clicking within the grid view. This generated Aqua Command will include all of the settings of the grid/graph display. If these settings are stored with a query as a file, users can re-execute and generate the same grids and graphs again as many times as needed. As data changes the chart dynamically changes with each re-execution of the query. Pivot Grids Results also have the Script to Window feature for generating Aqua Commands scripts.
1. Right-click select Script to Window | 2. View resulting Aqua Commands |
After generating a script, using "Save As" from within the query toolbar makes it possible to save the query and Aqua Commands together in a shared file or directory so that multiple users of Aqua Data Studio can access the layout and results.
Save as Aqua Commands script |
Selecting View in Excel Viewer after selecting cells, will display selected data from the grid in Excel or Excel Viewer such as Open Office. A button in the Grid Results toolbar allows you to either View as Spreadsheet, or Email as Excel Attachment (with email SMTP settings entered in File > Options > Email) the selected cells and rows in the grid. Excel 2007 file formats are supported and you can set which version of Excel is used as the default in File > Options > General > General > Default Spreadsheet Format.
1. Select grid data | 2. Right-click select Excel Viewer |
Right-clicking within a grid and selecting Print allows printing of grid results alone. The Print Preview displays margin, page orientation, and individual page previews for each page printed if the grid is wider than a single page width.
ADS Printing Options |
Grid and Grid Chart Process
Below is a step-by-step example of generating Grid Results and then creating charts from those results.
1. Open the Query Analyzer | 2. Execute a Query | 3. Open Grid tab click Show Chart | 4. Chart Display Area opens | 5. Select Category in Display Area | 6. Select Series in Display Area |
7. Set Chart Options | 8. Maximize Chart View | 9. Column Chart | 10. Chart Types | 11. Chart Themes | 12. Switch 3D to 2D |
13. Save Chart as Image | 14. Script the Chart to Window | 15. Save and Share the Chart | 16. Generate AquaScript | 17. AquaScript in AquaScript Editor |
Pivot Table concept and Aqua Data Studio's Pivot Grids - Pivot tables, discussed as Pivot Grids within Aqua Data Studio, allow the grouping and summarizing of selected columns and rows of data to obtain a desired report. They are particularly useful with large amounts of data, helping a user to classify data by categories, and obtaining summaries without the time-consuming search that it would normally take to look through all of the data. For more information on this see Wikipedia article about Pivot Tables.
Pivot Grid configuration is persistent over multiple runs of the same query in the same query panel, i.e., if a user configures a pivot grid and then re-runs the same query, this pivot grid will maintain its configuration. As with the Grid Results, sort Ascending or Descending after a right-click in data sorts it. Pivot Grids also allow sorting by Data Row Fields names. For example, all of the states of the U.S. were listed under an expandable row tab within the pivot. Sorting of either kind immediately affects the Chart.
Pivot Grid configurations can be saved as XML layouts with a right-click within a Pivot and those layouts can be loaded back into existing pivot tables. Saving as XML Layout does not include a Pivot Grid Chart's settings, it is only for the Pivot Grid. A full discussion of Aqua Data Studio's Charting Features can be found here.
Below is a step-by-step process for creating Pivot Grids with Charts.
1. Open Pivot Grid click Show Chart | 2. Drag Fields into Row Field | 3. Drag Fields into Column Field | 4. Select Column Pivot Chart Type | 5. Edit Column Fields | 6. Line Pivot Chart selected |
7. Review Aqua Command Script | 8. View Pivot Grid in Excel Viewer | 9. Save as Excel worksheet | 10. Script Pivot Grid to Window | 11. Pivot Grid Options | 12. File saved as SQL with Aqua Commands |
13. Pivot Grid Aggregate Functions | 14. AquaScript in AquaScript Editor |
Pivot Grid in Query Builder results - The Query Builder results also have a tab presenting the results as a pivot grid. The number of pivot grids corresponds to the number of result sets obtained when running the query. The pivot grids are displayed on a multi-level split-pane providing full control over the sizes and configurations of each pivot grid. See the Query Builder section for more information. The Pivot Grid within the Query Builder has exactly the same functionality as the Pivot Grid launched from the Query Analyzer.