MicroStrategy ONE
Create File Device statement
Creates a file device. A Distribution Services file device is used to automatically send a MicroStrategy report or document to a folder on a computer on your network in a file format that the user chooses when subscribing to the report. The device is based on a transmitter in the system.
CREATE FILEDEVICE "device_name" TRANSMITTER "transmitter_name" [DESCRIPTION "description"] [FILELOCATION "location"] [ALLOWUSERINFO (TRUE | FALSE)] [CREATEFOLDER
(TRUE | FALSE)] [APPENDTIMESTAMPTOFILENAME (TRUE | FALSE)] [OVERWRITEFILES
(TRUE | FALSE) [APPENDTOFILE (TRUE | FALSE)] [USEBACKUPLOC (TRUE | FALSE)]
[BACKUPLOCATION "location"] [NUMBEROFTRIES num] [TIMEBETWEENRETRY time] [DELIVERYTIMEOUT time] [FILEREADONLY (TRUE | FALSE)] [FILEARCHIVE (TRUE |
FALSE)] [FILEINDEX (TRUE | FALSE)] [ENCRYPTCOMPRESS (NONE | ENCRYPT |
COMPRESS)] [UNIXACCESSRIGHT "accessrights"] [ENABLEUNIXTOWINDOW (TRUE | FALSE)] [USERNAME
"username"] [PASSWORD "password"] [MOUNTROOT "mountroot"]];
where:
-
FILEDEVICE "device_name" is the name of the new device to create, of type string.
-
TRANSMITTER "transmitter_name" is the transmitter that the new device is an instance of and is based on, of type string. This should be the name of a file transmitter in the system.
-
DESCRIPTION "description" is the description of the device, of type string.
-
FILELOCATION "location" is the path and folder where you want the file delivered, of type string.
-
ALLOWUSERINFO indicates whether you want the user to be able to specify a file location when he subscribes to a report or document. If you specify TRUE and you provide a FILELOCATION, the location you provide is used if the user does not specify one.
-
CREATEFOLDER indicates whether you want the system to automatically create folders if the specified file location is not available.
-
APPENDTIMESTAMPTOFILENAME indicates whether you want the system to automatically add the file's creation date and time to the end of the file name.
-
OVERWRITEFILES indicates whether you want the system to automatically overwrite older files of the same name, if they exist.
-
APPENDTOFILE indicates whether you want the system to automatically append the contents of the new text file to an existing text file of the same name, if one exists.
-
USEBACKUPLOC indicates whether you want to save reports or documents to a backup location if delivery fails.
-
BACKUPLOCATION "location" is the path and folder where you want the file delivered as a backup if the primary one fails, of type string.
-
NUMBEROFTRIES num is the number of times to try creating the file, of type numeric.
-
TIMEBETWEENRETRY time is how long, in seconds, to wait between retries, of type numeric.
-
DELIVERYTIMEOUT time is how long, in seconds, to allow for deliveries. After this time passes, any incomplete delivery is considered a failed delivery and counts toward the number of retries, of type numeric.
-
FILEREADONLY indicates whether the file should be read only.
-
FILEARCHIVE indicates whether the file should be archived.
-
FILEINDEX indicates whether the file should be indexed.
-
ENCRYPTCOMPRESS is the encryption/compression setting. Choose one of the following:
-
NONE indicates that the file should not be encrypted or compressed. This is the default.
-
ENCRYPT indicates that the file should be encrypted.
-
COMPRESS indicates that the file should be compressed.
-
UNIXACCESSRIGHT "accessrights" is the set of access settings for UNIX and Linux operating systems, of type string.
-
ENABLEUNIXTOWINDOW indicates whether you want to deliver files from an Intelligence Server running on UNIX to a Windows location. This process uses the Sharity (tm) software to resolve the Windows file location as a mount on the UNIX machine. To enable cross-platform delivery, Sharity must be installed on the Intelligence Server machine. For information about Sharity, see the Sharity website at http://www.obdev.at/products/sharity/index.html.
-
USERNAME "username" is the user name of the Windows network login used to access the file location, of type string.
-
PASSWORD "password" is the password of the Windows network login used to access the file location, of type string.
-
MOUNTROOT "mountroot" is the location on the Intelligence Server machine where the mount is stored, of type string.
Example
CREATE FILEDEVICE "MyFileDevice" TRANSMITTER
"File" FILELOCATION "C:\Users\Administrator\My Documents\MSTR
Reports\";