After inserting or manipulating report objects, you can view the results in the preview window. You can switch back and forth between the design and preview windows by using the tabs in the upper left-hand corner of the Report Designer, or by selecting 'Design' or 'Preview' from the View menu. The preview window gives you an accurate picture of what the report will look like if it is printed or exported.
Preview Window
The preview shows the page dimensions in inches or centimeters (depending on which unit is selected with the toggle button at the upper left-hand corner of the designer window where the rulers meet. The drop-down menu at the right-hand side of the toolbar allows you to set the zooming for the preview.
You can navigate around the report using the toolbar, or the View menu. The toolbar buttons perform the following functions:
Go to the first page of the report
Go to the previous page of the report
Go to a specific page (that you enter in the 'Page' text box.)
Go to the next page of the report
Go to the last page of the report
These navigation functions can also be performed by selecting 'First Page', 'Previous Page', 'Next Page', 'Last Page', or 'Go To Page...' from the View menu.
6.2.) Other Preview Window Options
Other options in the preview window toolbar perform the following functions:
Save the file
Export the file
Print the report (This option is unavailable if Report Designer is run as an applet)
Load the entire report in the page viewer window. For more on this please see section 6.2.4.
Refresh Data
In addition, the File, and Data menus remain active, allowing you to manipulate the file, print, refresh data, and view column mappings.
The first time you preview a report, you will be presented with the data options dialog. This dialog allows you to set several options related to how the preview window displays report data.
Preview Data Options Dialog
The first option allows you to select whether or not to use live data when previewing the report. If you select live data, then the report will connect to the data source, and retrieve the data every time the report is previewed. Note that if the data cannot be obtained (for example, if the database connection is down), then the preview will show an error. You will then need to reload the report (once the connection has been reestablished) or go back to the Preview Data options and select to use saved data. If you select to use saved data then the report will show whatever data it has when you preview the report. This could be the two records of back-up data that are stored in the template, the first twenty records that are retrieved when a report is first created, or the full data set from the previous preview (if the option had been set to use live data).
If you elect to use live data to preview the report, a second option can be set that allows you to limit the number of records that should be retrieved from the data source. If your report uses a large data set, this option allows you to see the report with data while limiting the processing time, and preserving client memory.
Once you set this option the first time a report is previewed, you will not be prompted again when you preview the report. If you want to change these settings, select "Set Preview Display Options" Data menu. This will bring up the dialog again, allowing you to change the preview settings.
Within the preview window you can sort the data based on any column in the report in ascending or descending order. To do this, select ‘Sort by (ascend)’ or ‘Sort by (descend)’ from the View menu. Each option will bring up a secondary menu containing all of the report column fields. Selecting a column field will cause the report to sort by that column in either ascending or descending order. This feature is also available in the Report Viewer applet.
To sort by multiple columns, select 'Sort By...' from the View menu. This will bring up a dialog allowing you to select which columns to sort by, and the direction.
Preview Sorting Dialog
To sort by a column, select it in the left-hand side of the dialog, and click the 'Add' button. You can set the direction of the sort, by selecting the column in the right-hand side and clicking either the 'Ascending' or 'Descending' button.
*Note - any sorting performed, will not be saved with the template. When the template is re-opened (run), the data will be in the original order. You can, however, export the report after sorting, and the exported file will reflect the re-ordered data.
It is not recommended that you use this feature with reports containing a large amount of data, as this will use a large amount of memory, and can compromise performance.
If your report uses a parameterized query, or if you have defined any formula parameters in the report, you will be prompted to select parameter values when you preview the report.
Parameter Prompt Dialog
Depending on how the parameters are mapped, you are prompted to type in or select the parameter values. Clicking 'Ok' will generate the report using the specified values. You can disable parameter prompting by toggling the 'Preview Parameter Prompt' option in the Data menu. If date variables are not mapped to a database column, the parameter prompt will appear as below, with the options of entering a date from the calendar or a date variable.

Date Parameter Prompt Dialog
For more about query parameters, see section 3.2.2.2. For more about formula parameters, see section 8.2.6.
Generally when you preview the report, the entire report with it's data is kept in memory. This allows you to quickly preview, and navigate through the generated report. However, for large reports previewing the entire report could significantly affect system performance as the entire report is loaded in memory. To prevent this problem, you can limit the number of records that are fetched during preview as detailed in section 6.2.1.
However, when creating an ad-hoc report, you may want to preview the entire report without loading it in memory. To do this, EspressReport allows you to load the report in the page viewer. To do this, select 'Launch Page Viewer" from the View menu, or click the 'Launch Page Viewer' icon on the toolbar. This will open a page viewer window containing the report.
Report Shown in Page Viewer Window
The page viewer window will show the entire report. You can navigate around the different pages, clicking the buttons on the toolbar at the bottom of the window, or by right-clicking and selecting to change pages from the pop-up menu. Because the page viewer is a static format the window will not automatically reflect any subsequent changes made to the report. You will need to close the window and re-launch the page viewer. For more information about the page viewer, please see Chapter 2 of the Programming Guide.
6.2.4.1.) Unmapped Drilldown Parameter
When viewing a report with unmapped drilldown parameters, clicking on the links in the main report will cause a parameter selection dialog to pop up allowing you to fill in the unmapped parameters.

Parameter Selection Dialog
Once the values are entered, click OK and the drill report will be shown. To return to the previous level, click on the back button in the page viewer toolbar.

Drill Down Level
The output you see in the preview window is based on the page dimensions and margins that are set in the design window. The page dimensions are marked by the rulers, with the shaded areas indicating the page margins. To adjust these properties select 'Page Setup' from the 'Option' menu. This will bring up a dialog box prompting you to set the page orientation (landscape or portrait), height, width, and margins. Measurements are in inches or centimeters depending on which unit is currently selected. Changing the orientation will also change the default print properties.
Page Properties Dialog
7.) Saving and Exporting Reports
After you are finished editing the report, you can save it as a template, or export it to HTML, DHTML, PDF, CSV, Excel (XLS), Excel 2007 (XLSX), Text, XML, Rich Text, or View (Page Viewer) format.
You can save the current report by selecting 'Save' or 'Save As' from the File menu, or by clicking on the save button on the toolbar. All reports are saved as templates either in .rpt (binary) or XML format. Selecting the save option will simply overwrite the existing file, unless you are working on a new report that has yet to be saved. Selecting the save as option will bring up a dialog box prompting you to create a file name. The save as dialog also has several checkboxes.
Save As Dialog
Create HTML: This will create an HTML page with the Report Viewer or Page Viewer applet embedded. The file will have the same name as your .rpt file and will be placed in the HTML directory. By default the Report Viewer applet is used. For more on the Report Viewer please see Chapter 1 of the Programming Guide.
Use Page Viewer: Checking this option indicates that you would like to generate the applet page using the Page Viewer applet instead of the Report Viewer. For more information about the Page Viewer, please see Chapter 2 of the Programming Guide.
Use Swing: This checkbox specifies whether or not to use the swing version of the Report Viewer or the Page Viewer depending on which viewer is selected for the applet page.
Create XML: This checkbox specifies whether or not to save the report in XML format. By default, reports are saved in binary (.rpt) format. When this checkbox is checked, EspressReport will generate the template in XML format. The XML file can be saved and re-opened by the Designer. It can also be applied as a template to other reports.
Create PAK: This checkbox specifies whether or not to pack the report for deployment. A .pak file takes the report, and all the ancillary files associated with it including charts, sub-report templates, and drill-down templates, and places them in a single binary file. This configuration makes it easy to deploy reports, and move them between installations. If you re-open a .pak file in Report Designer it will expand all of the files back to their original location, so those directories will need to be present for a .pak file to be opened successfully. Also, refrain from renaming the pak file after its creation, this will lead to problems during expansion. For more information about .pak files, please see Chapter 3.5.1.2 of the Programming Guide.
Create Style: This checkbox specifies whether or not to save the report as a custom style. Reports saved in this format can be applied as a default look and feel to new reports. However, they cannot be used as a report any more. For more information about this featue, see section 4.6.1.
Save All Data: This will save all of the report data in the template. By default, only two records are saved. This feature is useful if you would like to preserve the structure of a crosstab when changing data sources, or editing the report without the datasource. It also allows users to share a complete report when the data source isn't available. Reports are always opened with back-up data in the Report Designer. Users can get the latest data by selecting the "Live Data" option when previewing the report.
7.1.1.) Changing the Save Location
By default reports are saved/opened from the /templates/ directory. You can change the default directory by modifying the reportdesigner.bat/.sh file, or modifying the HTML source of the applet page used to launch Report Designer.
To change the default save location, add the following argument to the reportdesigner.bat or .sh file: -templatesDirectory:Path where the path is a directory relative to the root directory of the installation. For example -templatesDirectory:templates/mytemplates would set the default directory to EspressReportInstallDir/templates/mytemplates.
If you're running Report Designer through an applet, you will need to add the following parameter to the applet HTML page: <PARAM NAME="templates_directory" VALUE="templates/mytemplates">.
Both data registry files and report templates in EspressReport can be saved in XML format. By default both types of files use the Western European encoding. In order to save data registries (including queries), and report templates correctly in XML, you will need to set the XML encoding to use a different character set. For more information about using this feature, please see section 1.2.4 of the Internationalization Guide.
You can export the current report to a variety of formats, directly from the Report Designer. To export a file select 'Export' from the 'File' menu. This will bring up a second menu allowing you to select the type of file that you would like to export to: HTML, DHTML, PDF, CSV, Excel (XLS), Excel 2007 (XLSX), text, XML, rich text, or view. You can also export a file by clicking the export file button on the toolbar.
HTML: If you select HTML as the desired export format, you will be prompted to enter the file name and location of the new HTML file. Because HTML is a text only format, charts will be saved as separate image files in the same directory as the HTML file. If your report includes a chart, be sure to set the chart export format before exporting to HTML, to specify the desired image format and attributes. If your report has images, the image files will be referenced in the HTML document.
You can specify to export the report to one page, or multiple pages. If you specify one page the entire report will be exported into one HTML file. If you specify multiple pages than each page of the report will be generated in a new HTML file. The output pages are linked by a navigation bar on the top of each page.
*Note - When using HTML export, not all of your report attributes will translate perfectly. For more accurate output, export to DHTML or PDF.
DHTML: If you select DHTML as the desired export format, you will be prompted to enter the file name and location of the new DHTML file. Because DHTML is a text only format, charts will be saved as separate image files in the same directory as the DHTML file. If your report includes a chart, be sure to set the chart export format before exporting to DHTML, to specify the desired image format and attributes. If your report has images, the image files will be referenced in the DHTML document. DHTML will produce a much more accurate output than HTML, however not all of the report features will translate accurately in older browsers. Recommended for DHTML viewing, are Internet Explorer 5.0 and above, and Netscape 6.0 and above.
You can specify to export the report to one page, multiple pages, or as a paginated single page. If you specify one page the entire report will be exported into one DHTML file. If you specify multiple pages than each page of the report will be generated in a new DHTML file. The output pages are linked by a navigation bar on the top of each page. If you specify to export as a paginated single page, only one DHTML file will be generated, but the page size, spacing, and margins will be retained, allowing the report to be printed out of the browser and appearing the same as if printed from a PDF or from Report Designer.
You can also specify to use internal or external style sheet (CSS) definitions to apply formatting to the exported DHTML instead of generating style definitions for each report element. For more information about this option, see section 7.2.2.

Export to DHTML Dialog
For reports with grouped data (except for Side-By-Side Master & Details reports), you can elect to add expand and collapse controls for the grouping. This allows for a more compact presentation of the report. Each grouping can be expanded and/or collapsed depending on the viewing requirement. When selecting this option, you can also choose the initial presentation, i.e., show the report completely collapsed, completely expanded or expanded to a particular group level. You can also choose to enable animation wherein the grouping, that is being expanded or collapsed, fades in or out of view. Note that the expand and collapse controls can only be selected for Single Page exports and the controls will not appear if the section header/footer is empty.
For DHTML and HTML exports you can specify a title for the generated page. The title will appear as <title> meta elements in the export. To add a title, select 'Html Page Title' from the Option menu. This will bring up a dialog allowing you to enter the title.
PDF: If you select PDF as the desired export format, you will be prompted to enter the file name and location of the new PDF file. Because the PDF format supports images, there are no separate files created by the export.
For PDF files you can also set encryption. When you check the 'Encrypt PDF Export' box in the export dialog, two new options will appear, allowing you to specify a user and an owner password for the generated document. More encryption options are available when exporting through the API. For more information on this please see section 3.5.7.3 of the Programming Guide.
CSV: CSV export creates a text file of the data used in the current report with a comma field delimiter. If you select CSV as the desired export format, you will be prompted to enter the file name and location of the new CSV file.
*Note - CSV export will only export the data associated with the report, and none of the objects and attributes of the report itself.
Excel: If you select an Excel spreadsheet as the desired export format, you will be prompted to enter the file name and the location of the new spreadsheet. EspressReport generates a formatted Excel output where spacing, fonts, colors, lines, and grids get applied. Excel exports also include charts and images as well. Note that charts will be exported as images and thus are not editable in Excel. Any gif, jpeg and/or png images will also be shown in the Excel export. To get a plain data dump to Excel, you can use the CSV export.
Excel 2007 (XLSX): Excel 2007 (XLSX) export creates an XLSX file used in Microsoft Excel 2007/2010. If you select an Excel 2007 as the desired export format, you will be prompted to enter the file name and the location of the new spreadsheet. EspressReport generates a formatted Excel 2007 output where spacing, fonts, colors, lines, and grids get applied. Excel 2007 exports also include charts and images as well. Again, the charts will be exported as images and thus are not editable in Excel.
If you plan to use Excel functions on the report, you will want to select the option "Fit numeric value into a single cell". This option guarantees that each numeric data is exported to its own cell allowing you to use these values in Excel functions. Note that this option will sometimes affect the cell alignment of exported report.

Export to Excel Dialog
For reports with grouped data, you can select to print each group on a different sheet in the exported file. This option is set in the section menu for the Group Header section. For more information, please see section 5.3.
*Note - Since Excel spreadsheets are a fixed field format, not all report elements may translate correctly.
TXT: Unlike CSV, which creates a comma delimited data file, the text export feature generates the entire report as a text file. Because the report is exported as pure text, no formatting information is retained. If you select text is the desired export format, you will be prompted to enter the file name and the location of the new text file, as well as the delimiter for the file (either tab, space, double space, comma, or semi-colon)
XML: There are two XML export versions. One is a data file, and the other exports report data with formatting information.
Data File: This XML export option exports the data used by the report in XML format. The format of the XML file is the same as the formatting requirements for XML input data.
Data and formatting: This XML export creates an XML version of the whole report. All of the report data as well as formatting information are included. This file is similar to an XML version of the DHTML export and can be used in conjunction with style sheets to display HTML content. This export allows you to export the entire report as one XML file, or as a separate file for each page.
Rich Text: If you select rich text as the desired format, you will be prompted to enter the file name and the location for the new rich text file. EspressReport uses the full capability of the RTF 1.5 specifications to generate a rich text output very similar to the actual report. The rich text export may not work in all viewers. By default, EspressReport will export all the colors in the RTF export directly into the output. However, older versions of MS Word only support 16 colors. To support these viewers you can export the RTF using 16 colors. This option will convert the colors used in the report into the basic color palette for MS Word 97.
View File: If you select a view file as the desired format, you will be prompted to enter the file name and the location for the new view file. A view file is the report export specific to EspressReport that can be loaded in the Page Viewer component. The collection of files that are created consist of one VIEW file (with extension .view) and a series of PAGE files (with extension .page). The first page of the report is stored in the name_FIRST.page file, where name is the name specified during export. The last page of the report is stored in the name_LAST.page file. Intermediate pages of the report are stored in name_number.page, where number is made up of consecutive integers starting from 0. For more information about the Page Viewer, see Chapter 2 of the Programming Guide.
EspressReport allows you to use any font on the system for reports. For most formatted exports (HTML/DHTML/Rich Text/Excel/Excel 2007) system fonts will translate automatically in the generated output. (For Rich Text and Excel/Excel 2007, if the fonts cannot be found, they will default to Arial). For PDF, however you will have to manually specify a .ttf (true type font), .ttc (true type collection), .pfb, or .afm file for any system font that you would like to use in the report.
To set font mapping for PDF export, select 'Font Mapping' from the Option menu. This will bring up a dialog allowing you to specify font files.
Font Mapping Dialog
For each font and style combination, you can select a specific .ttf, .ttc, .pfb, or .afm file for that font. You can either type the full path, or browse to the font file. If your using a .ttc file you will need to specify the font index in the box provided (.ttc files contain more than one font). Once you have specified the correct file, click the 'Add' button to save the mapping to the list. You can edit or delete existing mappings, by selecting them in the list, and clicking the appropriate button.
7.2.1.1.) PDF Font Mapping Import/Export
You can pass the font mapping from one report to another using the Import/Export feature. You can export the font mapping, by clicking the 'Export' button on the font mapping dialog. This will bring up a dialog box prompting you to specify a file name. The font mapping will then be saved as an XML file. You can load a font mapping XML file by selecting the 'Import' option from the dialog. This will bring up a dialog box prompting you to specify the XML file that you would like to import. Click on 'OK' and the mapping stored in the XML file will be applied to the current report.
When exporting a report to DHTML, by default the style definitions are created for each element in the report. This provides for the fastest exporting. However, for large reports this can result in a very large file size. To limit the size of the generated DHTML file, users can select to generate an internal list of global style definitions. This option is slightly slower, but it produces a significantly smaller file. In addition, EspressReport provides an option that allows users to apply their own style definitions to report elements by selecting a .css file when exporting the report.
If you are going to use external style sheet definitions, you will need to first select the class name from the external style definitions that should be associated with elements in the report. To set the class for a report element, right-click on the cell and select 'Set Style Class Name' from the pop-up menu. This will bring up a dialog allowing you to specify a style name for that report element.
Set Style Class Dialog
Elements for which you do not select a style class will generate their own style based on the settings in the report when the report is exported to DHTML.
Users can also export a .css file for the formatting defined in the report. These style definitions are the same as would be generated by the internal style sheet option. This feature can be used to apply formatting created in the Report Designer to other reports, or other Web pages. To export a .css file from a report, select 'Export Style Sheet' from the Option menu. A dialog will open prompting you for the name and location for the generated file.
CSS options can be set in the export dialog for the DHTML export.
DHTML Export Dialog
The checkbox marked 'Use Internal Style Sheet' enables/disables the option to generate an internal global list of styles. The 'Use External Style Sheet' option allows you to specify the location (either relative path or full HTTP path) of a .css file which contains the definitions for the style classes that you have assigned to report elements.
*Note - The formatting from an external style sheet file will only be applied to the DHTML export. Other export formats will use the formatting defined in the report template.