How was this implemented?
Do you have a data label control where the 'Literal' Property is enabled, and the Prevent XSS is disabled?
Are you setting the data label with the script as the value?
Or do you have the <script>window.print();</script> defined in a expression, and the mapping the expression to the data label with the settings described above?
You can also do a:
when form is initialized
- set property control of the data label described above, setting the expression to the expression with the '<script>window.print();</script>' defined, this may ensure that the print windows will load after the form has fully loaded