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

KB19664: How to use report links to simulate drilling to a template in Freeform SQL or Query Builder reports in MicroStrategy Developer


Stefan Zepeda

Salesforce Solutions Architect • Strategy


Article outlines how to report link functionality to simulate drilling to a template in Freeform SQL or Query Builder reports in MicroStrategy Developer

In Strategy 9.x, drilling to a template is supported only for reports built against the project's primary, relational schema. When the user drills from an attribute, or attribute element, to a template, filter qualifications from the original report are attached to the new template to form a new report to execute against the warehouse. Resolving the filter against the template requires the full relational schema, and cannot be supported for Extended Data Access (XDA) reporting (Freeform SQL or Query Builder).
 
Strategy Developer (formerly known as Desktop) has a feature whereby a report can be linked to another report. The target report may be run as is, or prompts in the target report could be answered based on information in the source report. For the end-user, this behaves the same as right-clicking on an attribute and drilling, where the drill map is configured to add this element to the new report's filter.
 
A report of any type can link to a report of any other type. There is no restriction that Freeform SQL reports must link only to other Freeform SQL reports.
 
Report object mapping
If an attribute element from the source report should be passed into a prompt in the target report, the prompt must be an attribute element list prompt, and the source report's template attribute must be the same object as the attribute in the prompt. An element list prompt must be based on a normal project attribute*; therefore, the template attribute in the source report must be mapped onto the same normal project attribute. Mapping columns onto project attribute forms is accomplished in the Freeform SQL or Query Builder editor by navigating in the object browser at left to the Schema Objects folder. Once the attribute is located, it can be expanded to reveal its attribute forms, and these forms can be dragged into the column list.
 
To verify that the mapping is correct, go into grid design mode, save the report, and then right-click on the attribute to edit it. Any attribute forms that were mapped to XDA columns should have a form expression for Freeform SQL and/or Query Builder. The source tables for this form expression should be all of the XDA reports that define a mapping for the form.
 

ka04W000001IwLDQA0_0EM440000002ElN.gif

 
* Note: Element list prompts may also be built using attributes imported from OLAP Cubes. Technically speaking, these are XDA objects, but they are still valid for element browsing because importing an OLAP Cube into a Strategy project creates a schema that allows the Strategy MDX Engine to generate an element browsing query. Freeform SQL or Query Builder reports do not have the benefit of this additional schema information; therefore prompts for these reports must use regular project attributes, which do have the schema support required for query generation.
 
If it is required to link from a SQL report to an MDX (OLAP Cube) report, the cube attribute should be mapped onto the same project attribute used in the SQL report, and the prompt in the OLAP Cube should use the project attribute.
 
Linking reports
To set up a report link that behaves like template drilling, perform the following steps:
 

  • Build the source Freeform SQL report. In this example, "Average Call Time by Region and Call Center" from the Strategy Tutorial project is used.
    Note: The Call Center attribute on the template is the normal project attribute.
  • Build the target Freeform SQL report. The report here will return detail level information on Call Center activities, from the Operational Datamart database instance.
    Since users will be expected to link to this report based on Call Center, a filter condition is added with an element list prompt for Call Center. The prompt is optional, because users should also be able to link from the Call Center header to retrieve all data in the target report. If the prompt is not answered, then the SQL statement should omit everything from "and" to the end of that qualification. This is done by selecting this entire portion of the query and choosing "Prompt Dependent SQL" from the Edit menu.
ka04W000001IwLDQA0_0EM440000002ElR.gif
  •  
    For more details on the "Prompt Dependent SQL" option, consult the following Strategy Knowledgebase Technical Note.
    KB13611 (KB5200-80X-0536): Considerations for using optional prompts in Freeform SQL and Query Builder reports in Strategy SQL Generation Engine 8.0.x
  • Save and close this report.
     
  • In the source Freeform SQL report, right-click on the attribute that is the origin of the link (here, Call Center) and choose "Edit Links." Give the link a descriptive name at the top. (This name will appear in the context menu in grid view.) Choose the target report under "Run this report or document."
    After choosing the target, a list of prompts will be presented. Choose the Call Center prompt and select to answer it "Dynamically." This means that the answer will be taken from whichever row the user right-clicked on.
ka04W000001IwLDQA0_0EM440000002ElS.gif

Now, when the report is run, a user can right-click on a Call Center element and choose the target report under the Link submenu. The report will be run and only that Call Center's data will be retrieved (as seen in the page-by selection, where only Seattle is available in the target report).
 

ka04W000001IwLDQA0_0EM440000002ElP.gif

 
Further reading
A complete description of the report linking feature is found in the Strategy Advanced Reporting Guide. This PDF manual also includes documentation on Freeform SQL and Query Builder features, with additional details on introducing prompts into Freeform SQL reports, and mapping XDA attributes to project attributes.
 


Comment

0 comments

Details

Knowledge Article

Published:

June 8, 2017

Last Updated:

August 24, 2022