Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Execute Stored Process on SAS VA report load

Reply
Contributor
Posts: 33

Execute Stored Process on SAS VA report load

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

Contributor
Posts: 33

Re: Execute Stored Process on SAS VA report load

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.

Frequent Contributor
Posts: 123

Re: Execute Stored Process on SAS VA report load

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


Tricia Aanderud
Zencos Consulting
Twitter: @taanderud - Follow me!

Contributor
Posts: 33

Re: Execute Stored Process on SAS VA report load

 

<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.

Frequent Contributor
Posts: 123

Re: Execute Stored Process on SAS VA report load

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
Zencos Consulting
Twitter: @taanderud - Follow me!

Ask a Question
Discussion stats
  • 4 replies
  • 434 views
  • 2 likes
  • 2 in conversation