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

KB30208: How to get the Report Details section that contain the Report Filter information using MicroStrategy Web SDK version 9.4.1


Community Admin

• Strategy


This article discusses how to get the Report Details section that contain the Report Filter information using MicroStrategy Web SDK version 9.4.1

The example provided in this document is provided “as-is” to the user and assumes that the user:

  • Can program, compile (e.g. javac, jikes, etc.), and execute Java programs
  • Can configure environment variables (e.g. JAR files, property files, etc.)
  • Have all the necessary tools to create Java applications (JDK, IDE, etc.)
  • Has access to the Strategy SDK documentation.
  • Has read the customization warning at the bottom of this document

 
PREREQUISITES:
 
For the sample to work, the Strategy Web JAR files must be accessible by the Java Runtime
Environment. The Strategy Web JAR files can be found under:

  • Strategy Web Universal (JSP): {web_root}/WEB-INF/lib directory.
  • Strategy Web (.NET): Program Files\Common Files\Strategy directory.

Note:
 
More elaborate programs will require additional library files and are out of the scope of this document.
 
 
The Report Filter information is displayed in the Report Details section on executing a report in Strategy Web version 9.4.1 as shown below,
 

ka04W000000OgdTQAS_0EM440000002GvU.jpeg

 
The following code samples helps in retrieving the content of the Report Details section :
 
 


import com.Strategy.web.beans.WebBeanFactory;
import com.Strategy.web.beans.ReportBean;
import com.Strategy.web.objects.EnumWebReportExecutionModes;
import com.Strategy.web.objects.WebIServerSession;
import com.Strategy.web.objects.WebObjectsFactory;
import com.Strategy.web.objects.WebReportData;
import com.Strategy.web.objects.WebReportInstance;
import com.Strategy.webapi.EnumDSSXMLApplicationType;
public class GetReportFilterDetails {
public GetReportFilterDetails(){super();}
public static void main(String args[]) {
//Get the session object
WebObjectsFactory webObjectsFactory = WebObjectsFactory.getInstance();
WebIServerSession serverSession = webObjectsFactory.getIServerSession();
String SessionID = "";
ReportBean reportBean;
//Specify the server, project user and pwd information for creating a session with the IServer
serverSession.setServerName("hostname");
serverSession.setServerPort(0);
serverSession.setProjectName("Strategy Tutorial");
serverSession.setLogin("Administrator");
serverSession.setPassword("");
serverSession.setApplicationType(EnumDSSXMLApplicationType.DssXmlApplicationCustomApp);
try {
SessionID = serverSession.getSessionID();
WebBeanFactory factory = WebBeanFactory.getInstance();
reportBean = (ReportBean)factory.newBean("ReportBean");
reportBean.setSessionInfo(serverSession);
//Specify the ID of the report for retrieving the report details section
String strReport = "EAC0ECD14110E012DCF898B4CBC69DAA";
reportBean.setObjectID(strReport);
//Get the report instance
WebReportInstance ri = reportBean.getReportInstance();
ri.getResultSettings().getDetailsFormatter().setReportDetailsFormat("");
//Execute the report
reportBean.setExecutionMode(EnumWebReportExecutionModes.REPORT_MODE_DEFAULT);
//Poll status so that the report completes execution
ri.pollStatus();
//Get the report data from the bean
WebReportData reportData = reportBean.getReportData();
//Get the report details from the report data
String reportDetails = reportData.getReportDetails();
System.out.println("ReportDetails :" + reportDetails);
}
catch (Exception e) {
}
}
}

 
 
 
Upon executing the above code the following out put would be generated:
 
ReportDetails :Report Filter:
 
(Day (ID) Between 1/1/2006 and 1/30/2006)
 
 
WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.
 
 


Comment

0 comments

Details

Knowledge Article

Published:

June 13, 2017

Last Updated:

June 13, 2017