What is the Report Exporter and how does it work in Webtrends 7?
For products: Webtrends Enterprise 7.x Webtrends Professional 7.x Webtrends Small Business 7.x
Last modified: 6/1/2011
Introduction: While users can export reports via the Webtrends user interface, there may be instances where you may prefer to use the command line to do this. This article explains how to build a *.cfg file (a configuration file) which contains the information Webtrends needs for exporting tasks. Note: In previous releases, this utility was called the Webtrends Document Utility.
Prerequisites System requirements must be met. The Report Exporter must be installed on the system. If you want to convert Webtrends reports to alternate formats, or use Webtrends SmartReports for Excel, Webtrends also requires Microsoft Office 2000 or later to be installed on the client machine.
Process: The Report Exporter contains all functionality for exporting Webtrends reports for various formats. This article covers the command line instructions for the client-side interface to the program.
The Report Exporter:
Works with a .cfg configuration file
Exports to the following formats:
Webtrends SmartReports for Microsoft Excel
Note: When Webtrends Small Business users click the "Export to Excel" icon, a .csv file opens for editing. You can then import this file's contents into Excel. The output is delivered using one of the following methods:
Save to file
Send by e-mail
The following sections describe the .cfg file data and the query parameters.
The Report Exporter Interface - The Report Exporter can be run from the command line using the batch_export.bat file. The command line interface supports the following arguments:
-ei - Encrypt Interactive. The program will ask the user to enter a string to be encrypted and return it back to the command prompt.
-es - Encrypt Silent. Pass the string to be encrypted after the -es argument and the program will encrypt the string and return it to stdout.
The .cfg file - The .cfg file has an .ini file format. It includes a Main section and one or more export sections that are uniquely named by appending an incremented numeric value to the end of Export. The main section has a numExports entry, which conveys how many export sections there are. For example:
[Main] numExports=2 [Export1] - [Export2] -
These are the possible name / value pair entries that can be included in an export section.
Encrypted Username (username=) - Encrypted copy of the username used to log into Webtrends. To obtain the encrypted value, use batch_export.bat. For example: username=FFKJDSFDFGHJFGEWLUHFEHFJW Encrypted Password (password=) - Encrypted copy of the password used to log into Webtrends. To obtain the encrypted value, use batch_export.bat. For example: password=FDSZCIJQEWRJASDFASDFDSFDF
Profile (profile=) - Profile name. For example: "1.wlp"
Template (template=) - Report template selected for the export. "wtcomplete.wct"
Reports (numReports=, report=) - Specify which report(s) (formerly called chapters) to export. This includes an entry to specify the number of reports. To specify all reports:
To specify one or more reports, but not all, specify the number of reports and the reports themselves, one per line, appending an incremental numeric value to "report":
numReports=2 report1="abc" report2="def"
Note: The listed report must be one of the reports in the Template specified using the "template=" parameter or the report will otherwise be skipped.
Last Data Time Stamp (lastDataTime=) Specify the time stamp for the last time a call was made to the Report Exporter and new data was returned. The value time stamp is created by the Report Exporter and returned to the .cfg file created by the Report Exporter. It should then be used by the caller to specify when the last time data was retrieved for the report. If this value is passed, the Report Exporter compares this time stamp against the Webtrends engine's view of when the last time analysis data was created. If no new analysis data is available, no report data will be returned from the Report Exporter. If new data is available, it will be returned. If this argument is not specified, no comparisons will be attempted and report data will be returned. For example:
Date Range Type (dateRangeType=) - Specifies the type of date range used. Currently there are two options: dateRangeType=explicit An explicit date range is specified. The start and end dates are specified in Date Range Start (dateRangeStart) and Date Range End (dateRangeEnd). dateRangeType=macro A macro date range is specified. The macro is specified in Date Range Macro (dateRangeMacro).
Date Range Start (dateRangeStart=) - Specifies the report start date when the date range type is "explicit". If date range type is not "explicit" then this field is ignored. The format can be mm/dd/yyyy format. For example:
Date Range End (dateRangeEnd=) - Specifies the report end date, the last day to use in the report, when the date range type is "explicit". If date range type is not "explicit" then this field is ignored. The format can be mm/dd/yyyy format. For example:
Date Range Macro (dateRangeMacro=) - Date range is specified as a macro. The macro can be in one of the following forms:
Webtrends Date Format
Relative Date Macro
Comparative Reports (comparative=) - Flag is set if a comparative report is to be generated: comparative=1 Flag either non-existent or set to 0 if standard report is to be generated: comparative=0
Comparative Date Range Start (comparativeDateRangeStart=) - If the Date Range Type is "explicit" and the Comparative Report flag is set, this value holds the start date for the comparison report range. The mm/dd/yyyy format is used to specify the start date. For example:
Comparative Date Range End (comparativeDateRangeEnd=) - If the Date Range Type is "explicit" and the Comparative Report flag is set, this value holds the end date for the comparison report range. The mm/dd/yyyy format is used to specify the start date. For example:
Comparative Date Range Macro (comparativeDateRangeMacro=) - If the Date Range Type is "macro" and the Comparative Report flag is set, this value holds the date range macro for the comparison report range.
Number of Table Items (Rows) (numTableItems=) - Maximum number of table items (rows) to export. To select all table items, set the value to *. For example:
Number of Table Items (Rows) for 2nd Dimension (numTableItemsDim2=) - Maximum number of table items (rows) to export for second dimensions. To select all table items, set the value to *. For example: numTableItemsDim2=5 numTableItemsDim2=*
Search String (searchString=) - Search string used if the report search filter has been applied. This is used only in Excel reports. For all other formats, this is ignored.
Search Column (searchColumn=) - Specifies the dimension on which to apply the search string (searchString). This is used only in Excel reports. For all other formats, this is ignored.
Trending (trending=) - For Excel reports only, this can be set to 1 to include trend reports. trending=1 (The default for Excel reports is to not include trend reports.) trending=0 (For all other formats this is ignored.)
All Measures (allMeasures=) - For Excel reports only, this can be set to 0 in order to not retrieve all measures allowed. If set to 0, only measures specified in the template (and for which the user has access) are returned. allMeasures=0 (The default for Excel reports is to get all measures.) allMeasures=1 (For all other formats, this is ignored.)
Control Data (controlData=) - Control data includes a list of profiles and other data to which the user has access. If this value is set to 0, no control data is returned. The default is 0. controlData=1 If set to 1, control data is passed back in the intermediate XML data, and if format is Excel or SmartReports for Excel, the control data is converted to a control file.
Format (format=) - Format of the final report. Choices include the following:
word - Microsoft Word
pdf - Adobe PDF
excel - Microsoft Excel
smartexcel - SmartReports for Microsoft Excel
csv - Comma-separated values
Generate Insight Reporting Excel Template (insightTemplate=) - This is used for SmartReports for Excel reports only (format=smartexcel). If used and format is other than SmartReports for Excel, this item is ignored. If set to 1, the Insight Reporting Excel template is generated as part of the output. insightTemplate=1 If not supplied or set to 0, (and format is Excel), then the Insight Reporting Excel template is not generated. insightTemplate=0
Language (language=) - Language used in the report. Choices include:
If this value is not specified, the default language from the template file is used. For example:
Delivery (delivery=) - Report delivery choices include sending the report via e-mail and saving it to a file.
E-mail Server (emailServer=) - Hostname or IP address of SMTP server.
E-mail Username (emailUsername=) - Encrypted username to log into the e-mail server. To obtain the encrypted value, use the batch_export.bat utility.
E-mail Password (emailPassword=) - Encrypted password to log into the e-mail server. To obtain the encrypted value, use the batch_export.bat utility.
E-mail Subject Line (emailSubject=) - Text to use as e-mail's subject line.
E-mail TO Addresses (emailTo=) - Comma-separated list of e-mail addresses to which exported report will be delivered.
E-mail FROM Addresses (emailFrom=) - E-mail address to display in the from field of the e-mailed report.
E-mail CC Addresses (emailCc=) - Comma-separated list of e-mail addresses to which exported report will be delivered.
E-mail BCC Addresses (emailBcc=) - Comma-separated list of e-mail addresses to which exported report will be delivered.
File: Save As Path (saveAsPath=) - Path to which to save the report. For example:
Report Exporter .cfg File (configFile=) - If this value is set, the specified .cfg file will be created and populated with configuration data for the export. If the value is empty or non-existent, no file will be created. For example:
Report Server URL (serverURL=) - URL of the Webtrends UI server. This is where the report data is generated from. For example:
Account Alias (accountAlias=) - Account name (alias) to use when Webtrends is running in hosted mode. This is ignored if not running in hosted mode. For example:
Source (source=) - Specifies the source interface calling the Report Exporter. This is set when called from the various Webtrends interfaces. It is not set when a user calls the Report Exporter apart from a Webtrends interface. The following interfaces and source values should be used: On Demand Report source = ondemand Scheduled Report source = scheduled Express Viewer source = dashboard Excel Insight source = excel