Click or drag to resize
TOPICA Report ReportExport

[This is preliminary documentation and is subject to change.]

The ReportExport tag is used to generate links in reports.

Note that ReportExport does not generate any export data, only links. When the end user clicks such a link, an export file is generated on the webserver, and another link is displayed (in a new window). By right-clicking this second link, the user may download the generated file to the user's computer.

Export formats include comma-separated, semicolon-separated and tab-separated.

Note that the SQL query used to generate the exported data is passed in the URL to new new window, that displays the download link. There is a limit to how long the URL can be. In Internet Explorer this limit is approx. 2000 charcters. If the SQL query used to generate the exported data is long, this limit may be exceeded. The system checks if this limit is exceeded, and generates an error message if this is the case. To solve such problems, make the SQL shorter. Often it is sufficient to remove whitespace, but it may be necessary to rewrite the SQL completely. You could for example use views, stored procedures and/or functions in the database - this will usually lead to much shorter SQL queries in the report defineition. Of course this solution adds some complexity to the deployment phase - the ncessary views, stored procedures and functions must to created in the database.

ReportTable attributes

Attribute

Type

Description

Condition

TOPICA Basic expression

The TOPICA Basic expression is evaluated - it should return a Boolean value.

false: The ReportExport is NOT shown in the report.

true: The ReportExport IS shown in the report.

HeaderText

String

Specifies a header text to be displayed in the report.

The text may contain embedded TOPICA Basic expressions in {...}. This is used to display "dynamic" information, e.g. from the context, the date interval entered by the user, the value of computed variables (for debugging), etc.

HeaderTag

String

The HTML-tag used for rendering HeaderText.

SQLQuery

String

The SQL query used to get data for the table.

The query may contain embedded TOPICA Basic expressions (in {...}. This should be used to make the SQL query "context sensitive", i.e. the SQL query must depend on the context, the report was started in.

The framework does NOT enforce any security when getting data. It is the report designer's responsibility, that the SQL used only returns data according to the context.

For example, when a report is started in the context of an organizational unit, the SQL must contain a WHERE-clause, so that the query returns only data "owned" by the organizational unit in context.

Note that reports, that may be started in the context of an organizational unit, also may be run as "system reports", where NO organizational unit is in context. Take this into consideration when constructing the SQL query. For details on this context issue, refer to Understanding Context.

ExportName

String

The name of the temporary file generated on the web server (and thus the default name in the "Save As..." dialog box when downloading the file) is constructed from ExportName + a timestamp.

ExportComma

String

The text to be displayed on the link used to generate a comma-separated export file.

ExportCommaExtension

String

The filename extension for the comma-separated export file. Use this to control which application should by default be used to open the exported file. E.g. use "csv" to have Excel open the exported file.

ExportSemicolon

String

The text to displayed on the link used to generate a semicolon-separated export file.

Depending on the regional settings on the user's computer, you should use comma-separated or semicolon-separated text files for importing into Excel.

ExportSemicolonExtension

String

The filename extension for the semicolon-separated export file. Use this to control which application should by default be used to open the exported file. E.g. use "csv" to have Excel open the exported file.

ExportTab

String

The text to displayed on the link used to generate a tab-separated export file.

ExportTabExtension

String

The filename extension for the tab-separated export file. Use this to control which application should by default be used to open the exported file. E.g. use "csv" to have Excel open the exported file.

ExportFixed

String

The text to displayed on the link used to generate a fixed-format export file.

ExportFixedList

String

A list of column widths for the fixed-format export file. (...TODO...)

ExportFixedExtension

String

The filename extension for the fixed-format export file. Use this to control which application should by default be used to open the exported file. E.g. use "csv" to have Excel open the exported file.

ExportColumnHeaders

Boolean

If true, the first line in the generated file will contain column names (defined by SQLQuery).