A tip for moving SAS Visual Analytics reports in SAS Viya 4 between SAS Viya environments

2

In SAS Viya 4, you can create reports in SAS Visual Analytics that you may want to move around between machines. For example, what if you want to copy a report for from a development environment folder to a production environment folder? You may want to work on the report in one system before putting it onto a final system and making it generally available. Or, you may want to have a backup copy saved for recovery purposes.

There are a couple of ways you can save off reports in SAS Viya. You can use the SAS transport services in SAS Environment Manager to export the report package and then import it again to the target machine in SAS Environment Manager. However, import is controlled via permissions and if you are going into some environment where a permission has not been granted, you won't be able to do the import, even into your own personal folder. In this post, I will show you a handy trick you can use to copy a report so you can move it around to different folders, even on different machines.

Pulling from the diagnostics window

In SAS Visual Analytics, when you are editing your content, you can access a "diagnostics" window. It will show you the JSON (or XML) used the render the report. To open the diagnostics window, use the Ctrl-Alt-B key combination.

You can use this diagnostics window to save your report as a file to then import it into another folder. You may just need to fix up the library where the report data table exists, and then voila, your report is available in the target location! Here's how you do it...

Open the report you want to copy SAS Visual Analytics. Bring up the diagnostics window with Ctrl-Alt-B. The Diagnostics window shows you the JSON (or XML) of the report.

Save the JSON as a text file on your local machine and close the dialog window. The JSON file will be stored in your browser's default Downloads folder.

Moving to the target environment

Go to the target environment. Make sure you have a folder in that environment you can save the report into. I plan to store mine into My Folder.

I've also uploaded the dataset that the report depended upon into my CASUSER library.

In the target environment, open SAS Visual Analytics and click New to create a new report. Use the Ctrl-Alt-B key combination on the empty report. Clear out the existing XML and existing JSON by pressing the Clear on both windows. Then, paste your new JSON into the window.

I had to modify the JSON in the window with the new target library which was only in one place.

Load the json. The diagnostics window will close and the report should open successfully. Once loaded, check the Report to make sure all the pages are rendering correctly.

Once you have confirmed the report is working, be sure to click Save As to save the report to any folder in your target location that you have write permission to.

Voila! Your report is now in both machines. You can also save off the JSON so you have a backup copy if you need it.

I hope you found this tip helpful. Thanks for reading!

Learn more

Share

About Author

Nancy Rausch

Senior Manager, SAS R&D

Nancy Rausch is a Senior Manager in R&D at SAS. Nancy has been involved for many years in the design and development of SAS’ data warehouse and data management products, working closely with customers and authoring a number of papers on SAS data management products and best practice design principles for data management solutions. She holds a Master of Science in Analytics from Capella University, and a Master of Science from Duke University in Computer Engineering.

2 Comments

  1. Hi Nancy this was extremely helpful, Thank you ! . Just one comment: When moving to the target environment I think there is a Typo: "Ctrl-Alt-D" , . If you press that shortcut you get: "Printing debug enabled." , When I think you need to Press again: "Ctrl-Alt-B" to open the Diagnostics window correct?

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top