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

KB33185: How to display yesterday's date in a Report Services document in MicroStrategy Developer 9.x - 10.x?


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This technical note lists the steps to display yesterday's date in a Report Services document in MicroStrategy Developer 9.x - 10.x

There is no out of the box auto text in Report Services documents to display yesterday's date in Strategy Developer 9.x - 10.x. The following procedure describes how to achieve this requirement with a workaround: 
                                                                  

ka02R000000kbrZQAQ_0EM440000002E5p.jpeg

 

  • Create a metric "Yesterday" with expression "AddDays(CurrentDate(), -1.0)".                                                                                                                 Note: "CurrentDate()" and  "AddDays(Date,n)" are Strategy built-in functions. "CurrentDate()"  will be translated to appropriate syntax for different databases to retrieve current date. "AddDays(Date,n)" is used to return a date plus an offset (+ or -) n days. 
  • Create a report with the metric "Yesterday".
  • Add the report created in step 2 as dataset report of the document which is required to display yesterday's date.
  • Add metric "Yesterday" to the document section as dynamic text.
  • Right click on the dynamic text and then click on "Format".
  • Select to display the text box in the required date format  s shown in the image below:
     
  • Execute the document in PDF view, the dynamic text displays yesterday's date, as shown below:
     
                                                                              
ka02R000000kbrZQAQ_0EM440000002E5r.jpeg

 
 
 


Comment

0 comments

Details

Knowledge Article

Published:

June 7, 2017

Last Updated:

June 7, 2017