BookmarkSubscribeRSS Feed

Using Dynamic Text in a VA 7.4 or 8.2 Report

Started ‎05-10-2018 by
Modified ‎05-11-2018 by
Views 11,870

You will not find an object in Visual Analytics named Dynamic Text. Instead, you will find a Text object that allows you to insert dynamically driven data items. By using the Text object's dynamic capabilities you can build custom report titles, object titles, emphasize measures and even supply the last modified time of the data source in your VA Report. In this post, I will outline the ways how you can leverage the Text object's dynamic capabilities.

 

  In this example report below, I have used a red font color to indicate the dynamically driven text. (Click on the images to enlarge.)

 

  01_ExampleReport.png  

 

Let's take a look the available dynamic roles in the Text object. You can see from the Objects pane that the Text object is grouped under Other.  

 

From the Data pane we have the ability to add both Measure and Parameter data items. From the interactive editor of the Text object shown below, we also have the ability to insert the Table Modified Time and Interactive Filters.  

 

02_TextObjectFeatures.png  

 

The following sections will demonstrate how to configure each of these dynamically driven elements of the Text object.

 

 

Interactive Filters

The out of the box display for Interactive Filters includes the selected values for control objects added to either the Report or Page Prompt areas.  

 

To edit, be sure you are in Edit mode of Explore and Visualize. Click on the Text object to make it the active window and double click inside, then the interactive editor will open. Next, click on the Interactive Filters button. Use your cursor to position where you would like to add static text. In this case, I added the qualifier Default filter information:.  

 

Multiple control object values are separated by a comma and also accommodates multi-value control objects.  

 

03_InteractiveFilters.png

 

 

Parameters

While the Interactive Filter functionality is extremely useful, you may want to use prompt values more granularly to create custom report titles or even object titles. To do this, you must first create a parameter to hold the value selected in the control object, then use that parameter in the Text object.  

 

In my example report, I have two prompts and two custom object titles leveraging parameters. Let's look at each one individually.  

 

First is the Report Prompt, which prompts for year.

 

  1. Create your prompt by using the Control object of your choice and assigning the desired data role.
  2. Create a parameter that corresponds to the data type and assign it to the Control object's Parameter Role.
  3. For the Text object, assign the same parameter to the Text object's Parameter Role.
  4. Double click on the Text object, use your cursor to add static text as you like.

  04_ParametersExample1.png  

 

The steps are similar for the Page Prompt, which prompts for region. (Remember to click on the image to enlarge.)

  1. Create your prompt by using the Control object of your choice and assigning the desired data role.
  2. Create a parameter that corresponds to the data type and assign it to the Control object's Parameter Role.
  3. For the Text object, assign the same parameter to the Text object's Parameter Role.
  4. Double click on the Text object, use your cursor to add static text as you like.

 

  05_ParametersExample2.png  

 

Even though I demonstrate how to do this for both Report and Page Prompts, this same technique can be used for report canvas prompts. You just have to be sure you store the selected value(s) in a parameter that you can then use in the Text object's Parameter Role.     

 

 

Measures

Very much the same way the Text object's Roles are used to assign the Parameter values, we can do the same thing with a measure. This measure will be affected by any Report or Page Prompts automatically, but if you want to use a report canvas prompt you will need to create the Actions to the Text object appropriately.

 

Here you can see we are using the measure TotalExpense which is an aggregated measure of Expenses. Like in the previous examples, be sure to assign the measure to the Text object then double click to open the editor and use your cursor to add the static text.  

 

06_MeasureExample.png  

 

The only applied filters for this aggregated measure are the selected year and region, therefore this Sum _ByGroup_ will return the Total Expenses for that Year and Region.  

 

07_AggregatedMeasure2.png  

 

 

Table Modified Time

The last capability of dynamic text available in the Text object is the Table Modified Time.

 

The out of the box display uses the fully qualified datetime stamp and cannot be altered to a different format. To edit, double click inside the Text object and the editor will open. Then click on the Table Modified Time button. Next, use your cursor to position where you would like to add static text. In this case, I added the qualifier Data last updated:

  

 

08_TableModifiedTime.png  

 

 

Conclusion

The main takeaways from this post are twofold, first is that you can easily build dynamic customizable titles, emphasize measures or parameter values.  

 

Second, look to use the Text object for your dynamic text needs.  

 

Here is a quick mapping as a review of what was detailed in the steps above.  

 

09_ExampleReportMappings.png

 

   

Version history
Last update:
‎05-11-2018 01:54 PM
Updated by:
Contributors

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags