EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB16529: How to apply conditional formatting in a Report Services document based on whether or not a prompt was answered in MicroStrategy Developer 9.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


How to apply conditional formatting in a Report Services document based on whether or not a prompt was answered in MicroStrategy Developer 9.x

Consider a report with a prompt (not mandatory to answer) included in the report filter in Strategy Developer 9.x. The report template consists of the attribute that is used to define the prompt. When the report is executed and no prompt answers are chosen, all the elements for the attribute are seen in the grid, as shown below:
 

ka02R000000kYQBQA2_0EM440000002FC8.jpeg

 
Create a document with the above created report as the dataset. The design view of the document consists of the Quarter prompt and Revenue metric in the Document Header section, as shown below:
 

ka02R000000kYQBQA2_0EM440000002FCD.jpeg

 
When the document is executed and no prompt answers are chosen, the grand total for Revenue metric is displayed in the header, but no Quarter elements are displayed. When prompt answers are chosen, all the elements chosen are seen in the document header along with the sum of revenue for the chosen elements, as shown below:
 

ka02R000000kYQBQA2_0EM440000002FBy.jpeg

 
Instead of displaying no elements when no prompt answers are chosen, users can choose to display a static text box with text 'ALL' in the document header. However, this text box is displayed even when prompt answers are chosen. The requirement is to be able to apply conditional formatting on the text box to hide it when the prompt is answered. However, it is not possible to apply conditional formatting directly based on whether the prompt was answered or not, as shown below:
 

ka02R000000kYQBQA2_0EM440000002FC0.jpeg

 
To hide the text box when prompt answers are chosen, follow the steps given below:
 

  1. Modify the backstyle of the text box containing the prompt {&prompt1&} to opaque from transparent.
  2. Place this textbox on top of the textbox containing the text 'ALL.'
  3. Order of creation of textboxes governs their numbering and thus the stacking order on the document. For example, if the text box containing text 'ALL' is created first, it is given the name 'textbox1' and if the prompt containing textbox is created next, it is given the name 'textbox2'. Even if textbox1 is made opaque, since it is stacked under textbox2, textbox2 will always be visible.
  4. For the text box containing the text 'ALL' to be hidden, this textbox has to be created first and then the textbox with the prompt should be created and made opaque.

The design view of the document is as shown below. The text box ALL is present but is hidden behind the prompt textbox.
 

ka02R000000kYQBQA2_0EM440000002FC1.jpeg

 
When the document is executed without choosing any prompt answers, the textbox 'ALL' is seen along with the grand total of Revenue. When prompt answers are chosen, only the selected elements are seen with the corresponding revenue total, as shown below:
 

ka02R000000kYQBQA2_0EM440000002FC3.jpeg

 


Comment

0 comments

Details

Knowledge Article

Published:

June 8, 2017

Last Updated:

June 8, 2017