Sunday, December 21, 2008

Report Service Documents

Every time we rename an object, MicroStrategy updates that object’s name in all of its dependants. That’s true, right?… Or is it?
Well, it’s almost true. This fails when the object whose name we change is referenced as a data field in a Document.

Tip. A data field is a text field that is created either by dragging it from the Dataset Objects area into the Layout area, or by creating it manually and then typing the object’s name. The name should appear between braces ({}) and should be also surrounded by brackets ([]) if it contains spaces or special characters. 

Now, because the data field does not have an object ID, MicroStrategy is completely oblivious if the object referenced in it is renamed, thus the document will not run. Strangely enough, it performs fine if the object was moved to a different folder.

The way to avoid such mishaps is to do a dependence check when renaming a Metric or Attribute and see if they are being used as data fields inside a Document. All it takes then is typing the new name into the text box. 

Of course, if the object is used in the Document as part of a grid, then the Metadata does its job very well. 


6 comments:

  1. I've already read this on your own blog, Sorin Suciu. http://microstrategyblog.com/2008/12/report-services-documents/

    ReplyDelete
  2. He is also one of the contributor on this blog.

    ReplyDelete
  3. And here I was, thinking that no one reads this stuff :))
    I plan to post my tips&tricks to both blogs, for greater coverage. By the way, http://microstrategyblog.com is not my own blog - it belongs to Jeremy Clover and I'm merely a contributor.

    ReplyDelete
  4. OK, good to see you contribute on this blog too. I have found only one other blog website about MicroStrategy: http://www.aellament.com/blog/

    ReplyDelete
  5. THe best Practice to follow would be to alias the objects in the base report and use these aliased names in the Document. This is habit most developers lack . but it work when metric/attributes names etc change.

    ReplyDelete
  6. This looks like a sensible thing to do. Aliasing the objects in the report would definitely prevent the document from running into errors.

    ReplyDelete

Note: Only a member of this blog may post a comment.