Web Server Macro

A common environment setup is to have separate machines for your Production and Development environments.  While a lot of shops I’ve worked in will simply have separate Production and Development projects on the same physical servers (usually due to budget reasons), having separate physical machines gives you advantages like being able to restart the IServer / Web Server without causing outages for users.  Sometimes though, this can cause trouble with certain types of Document features.  Specifically, if you’re using links to images or other reports that require the full URL (for example, to support links in a Subscription or Export or Images hosted on a 3rd party server), you could run into trouble if you’re using different Web Servers for Production and Development.  While it would be a hassle to modify these options on each affected Document during testing and Migration, MicroStrategy offers a handy feature to make it much easier to maintain.

If you right click on a Project and choose Project Configuration -> Document and Reports, you’ll find two text boxes under Web Server.  Here, you can provide the URLs for the Web Servers that the project should use.

The first text box is the text value that will be replaced by using the {&WEBSERVER} macro on a Document.  You can use this AutoText when defining your URL and it will be replaced by the URL in the Project Configuration at run time.

The second text box is the URL that will be used in Subscriptions when using option to send Subscriptions as History List links.  While you don’t have to do anything else after setting this one, it is nice that we have two separate options.

BONUS TIP
Technically, this feature is just a Project level text variable.  You can only use it in Documents, but you don’t *have* to use it for it’s intended purpose.  Really, you could store any variable you want in here and use it anywhere in the Document.  For example, say you want to set a link on your Dashboard to drill to a different report in each Environment, or export to Excel or PDF in different environments, or pass some custom variable to an external application.  All of these things could be accomplished by utilizing this feature as simply a Global Variable instead of as a Web Server Macro.

You may also like...