BookmarkSubscribeRSS Feed
Obsidian | Level 7

I'd like to execute a stored process immediately when a SAS VA report is first loaded.


My current workaround is to simply have a stored process embedded in the VA report and making its container as small as possible, but it would be cleaner if the report was able to envoke the stored process upon load.




Obsidian | Level 7

I found an even better workaround. I put the stored process at the bottom of the SAS VA report and then used jquery to remove the element and had the original div it was contained in fill its parent height.

Lapis Lazuli | Level 10

This sounds interesting ... could you share your code?

Tricia Aanderud

Twitter: @taanderud - Follow me!

Obsidian | Level 7


	<script src="scripts/jquery.min.js"></script>
        var $stp_div=$(".stpFrame", window.parent.document)
				            .filter(function(){ return  $(this).children().length=== 0;}).parents().eq(1);
        var $stp_div_parent = $;



I am not a web developer by any means but this should work. I had to inspect the html to find the correct class name for the stored process frame. The tricky part was looking outside the current stored process frame with window.parent.document. After finding the element, just hide it, get the last element above it and fill the rest of the page with it.


This thread  helped me put jquery in the right place on the server to have access to it.

Lapis Lazuli | Level 10

I'll have to give it a try after SGF.  I've been playing with STPs in VA  ... testing the limits and seeing how to make things work better than expected.  🙂


Tricia Aanderud

Twitter: @taanderud - Follow me!



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2 in conversation