BookmarkSubscribeRSS Feed

SAS Visual Analytics: Use Object Templates for consistency and faster report development

Started ‎05-22-2019 by
Modified ‎05-22-2019 by
Views 3,837

Object Templates are available with the latest release of Visual Analytics 8.3. Object Templates are Objects with personalized Options that each user can save for him/herself, or if you are an Application Administrator, can be shared with other users.

 

The documentation has outlined several key points about object templates. But these Object Templates work similarly to Data Views (see my post about Data Views). The most important point, and common for both Data Views and Object Templates, is that once an Object Template is saved, there is no way to make changes that “push out” to everywhere it is used. If you want to make changes, you must save it as a new Object Template. The second important point for Object Templates is that no data role assignments are saved including data-related features such as display rules, filters, ranks, and sorting.

 

Let’s look at a few examples of when you may want to use an Object Template.

 

Graph Consistency and Reusability

Starting small, let’s take a look at a single object, the Bar Chart. On the left side is the default Bar Chart. On the right side, I’ve made several customizations to the Options for this Bar Chart. Notice I’ve changed the orientation of the bars, rotated the x axis data labels, changed the color of the bars and altered the title. Let’s say this is always how I want my Bar Charts to look, or at least start with this look. I don’t want to have to repeat these clicks every time I use a Bar Chart object. This is the opportunity when saving this customized object as an Object Template becomes ideal.

 

01_DefaultBarChartVSCustomized.png

Select any image to see a larger version.

 

To save this Bar Chart as an Object Template, click on the Bar Chart to activate the window, or hover over and use the Overflow menu to select Save to Objects pane.

 

02_SaveToObjectsPane.png

 

You will see a dialogue box open with the default name given to the new Object:

 

03_DefaultName.png

 

Then from the Objects pane you can use the properties menu to change the name. Also notice the toggle button to make the Object Template Shared. This option is available to me since I am an Application Administrator.

 

04_AppAdminObjectTemplate.png

 

If you are not an administrator, you can still save Object Templates but just not share them with other users. As you can see from the below screenshot, the Shared Object Template appears in the Objects pane but cannot be deleted or renamed.

 

You can, as an Application Administrator or non-Application Administrator, right-click on the Object Template and select Hide if you do not wish to see it in your Objects pane.

 

05_NonAppAdminObjectTemplate.png

 

Now that we have our Object Template saved, what does it look like when used? For this screenshot, I dragged both the default Bar Chart object and my saved Object Template Bar Chart onto a new page. You can see that my customized Options are saved with the Object Template Bar Chart.

 

Using Object Templates is ideal if your company or team wish to have all reports use the same style options for charts, titles, axis labels and orientation, etc.

 

06_NewPageWithDefaultAndTemplate.png

 

 

Standard Report Design and Template

Our first example was looking at a single object, the Bar Chart. But what if you would like an entire report to have a standardized template? Not just a requirements document but a template driven by the technology? This is possible using Object Templates and the Container objects.

 

In this screenshot, I show you how this Object Template is comprised of a Container object and inside that Container is an entire report layout! I named the Object Template Product Line Report which is a Standard Container object that contains ten objects. You can see each object listed in the Outline pane and each object’s Options are saved with the Object Template inside the Container.

 

Now the requirements document can include this Object Template as the base report and include any other report requirements such as the Page Prompts, parameters, customized calculations for the report and role assignments. For the report designer, having the object options saved with this template is a huge time saver also allowing management to focus on the numbers for each Product Line since they will be displayed a consistent manner.

 

07_ContainerObjectTemplate.png

 

Here are some development tips and tricks when creating this type of Object Template:

  • Develop the report you want to make into a template; start by adding the desired container type to the page.
  • I usually work with a layout first, so the next step I take is to add the other objects to the container. Use the Outline pane to easily move objects inside the container.
  • Assign data using the Roles pane and make all the desired object customizations using the Options pane.
  • Remember that no data-related features are saved with the Object Template, so be sure to document any desired display rules, filters, ranks, sorting, parameters, or customized calculations you wish to be replicated when others use your Object Template.
  • Use the Outline pane to select the container to create the Object Template

08_ContainerTemplateWithRoles_v2.png

 

In this example, I used the Standard Container to save as an Object Template but you may do the same with any of the other Container Objects: Stacking, Precision, etc.

 

Now you have seen how to use Object Templates at a simple level and complex. Most of us in front of the computer will look for ways to save mouse-clicks and typing; I hope that you find Object Templates make developing your Visual Analytic reports more fun and efficient!

 

 

 

 

Version history
Last update:
‎05-22-2019 09:47 AM
Updated by:
Contributors

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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