BookmarkSubscribeRSS Feed
TedP
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.

 

Thanks,

Ted

4 REPLIES 4
TedP
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.

TriciaAanderud
Lapis Lazuli | Level 10

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


Tricia Aanderud

Twitter: @taanderud - Follow me!

TedP
Obsidian | Level 7

 

<head>	    
	<script src="scripts/jquery.min.js"></script>
</head>
<body>
<script> 
    $(document).ready(function(){
        var $stp_div=$(".stpFrame", window.parent.document)
				            .filter(function(){ return  $(this).children().length=== 0;}).parents().eq(1);
        var $stp_div_parent = $stp_div.next();
        $stp_div.hide();
        $stp_div_parent.css({"height":"100%"});
});
</script>
</body>

 

 

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.

TriciaAanderud
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!

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1612 views
  • 2 likes
  • 2 in conversation