top of page
Writer's pictureOmar Vidaure

Track usage for a single MicroStrategy documents/dossier/report



There have been times when working in small projects that I needed to track a single dossier, documents, or report. In these cases, adding the small project to Enterprise Manager was not worth the effort and would log much more information than we would need.


There is a simple solutions to get this taken care of. There are 3 things we need to do.


1. Setup a SQL table for tracking usage

2. Create a Simple report

3. Configure the VLDB post report statement to insert the usage into the table.



Creating the Table

The table we create will depend on the information we want to log. I've added a key of the MicroStrategy parameters at the bottom of this page for reference.

At bare minimum, I'll create a table with the following columns


ID, UserName, ReportName, DateTimeStamp


Log table

Create a simple Report

Next I'll create a simple report. Typically I'd use a generic attribute just to generate some/any data and not cause a failure (I'll share the generic attribute details in another post) .



Configure post report statement

In the VLDB settings of the report, I'll add in the following insert statement which will be run once the report is completed. Make sure to add the report to the document/dossier you want to track.

Custom Tracking Insert Statement

Keep in mind that I'm using the MicroStrategy variables (provided below) to get some of the information to log. Also, the report should not be cached. A cached report will not execute custom VLDB code.


Cache setting can be found here:


Cache Option


After running the report a few times, I now have logged data! Sample below. Have Fun!


Logged Data

(MicroStrategy VLDB Wildcards)

MicroStrategy VLDB Variables
 

Thanks for checking out this blog post. If you found this post helpful please consider donating. Any contribution is appreciated! Just click the PayPal icon at the bottom of this page.







864 views1 comment

1 Comment


karl.stehmann
Jul 28, 2020

Hi Omar,


first of all a big thank you for the very helpful blog!


Ive a question to the first step: "Creating the table"


Where do I have to create the table? Is it a logical table in Microstrategy or do I need to create it in my Database?


I tried it with a logical table and I wonder why only the first two words are highlighted in blue.


And how would I see the logged data then? Where do I put the sql statement?


Thank you very much!

Karl


Like
bottom of page