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
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.
This sounds interesting ... could you share your code?
<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.
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. 🙂
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!
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.