Auto text codes allow you to automatically display information in a document, such as page numbers, the current date and time, and report filter details. For example, you add the auto text code {&DOCUMENT} to a document. When you view the document as a PDF, or display the document in Interactive, Express, or Flash Mode, the auto text code is automatically replaced with a text field containing the name of the document. For steps to add an auto text code to a document, see Adding auto text codes to documents.
The following auto text codes allow you to add document variable information to your document.
Description |
Code |
Sample Output |
Comments |
Page Number |
{&PAGE} |
1 |
The current page number |
Total Pages |
{&NPAGES} |
12 |
The total number of pages in the document or in the group's section before page numbering restarts |
Date/Time |
{&DATETIME} |
11/15/2003 7:10:55 PM |
Current date and time of the client computer. For PDFs, this is the date and time when the PDF was generated |
Current User |
{&USER} |
Jane User |
The full name, not Web login, of the user who generates the PDF or views the document |
Document Name |
{&DOCUMENT} |
Regional Sales Summary |
Name of the document as stored in the project |
Document Description |
{&DESCRIPTION} |
Revenue and profit by region |
Short description of the document |
Document Inbox Title |
{&TITLE} |
Regional Sales Summary for Tuesday |
The name of the document instance If you send a document to your History List, you can rename that instance of the document. This auto text code displays the instance name, rather than the original document name stored in the project. |
Document Notes |
{&NOTES} |
Notes: Administrator 3/10/2010 4:04:16 PM: Added metric Profit Margin. |
Notes (annotations) added to the document For background information on notes, see Using the Notes window. |
Project Name |
{&PROJECT} |
MicroStrategy Tutorial |
The name of the project in which the document is stored |
Prompts |
{&PROMPT1&} {&PROMPT2&} {&PROMPTn&} |
South (for example, if prompt1 is for the attribute Region) |
The user's answers to the prompts in the document; identified by number |
Document Execution Time |
{&EXECUTIONTIME} |
11/15/2008 7:11:15 PM |
The date and time the document was executed
|
Prompt Details |
{&PROMPTDETAILS} |
Prompt 1: Region prompt Northwest, Southwest Prompt 2: Year Year (ID) = 2007 |
Details for all the prompts in the document You can define how this auto text code is displayed (for example, if the prompt name is shown). For steps, see Configuring auto text codes. |
MicroStrategy Web Server |
{&WEBSERVER} |
http://localhost:8080 /MicroStrategy/servlet /mstrWeb |
Path of the web server being used, if the document is executed in MicroStrategy; otherwise, the value in project configuration |
Notes:
If the auto text code {&PROMPTn&} is used, but n is greater than the number of prompts in the document, the code cannot be replaced with pertinent information. Therefore, the code itself is displayed.
The Date and Time and Document execution time can be formatted like any other date and time text field, using the Properties and Formatting dialog box. For steps to format a text field, see Formatting text fields. For example, you can display only the date without the time, you can print the month name rather than the number, and so on.
To differentiate between Date and Time and Document Execution Time, run a document and send it to your History List. Each time you open the document from your History List, the PDF is regenerated. The Date and Time change each time, but the Document Execution Time does not change.
Related topics