Hi all,
I need to print the report page. i am using (window.print(); return false;) in the extended properties of the button. I am also using the media query in the CSS of the report page but there is no response after button click. can anyone tell how can i get this done? i am using media queries to avoid header and footer but the button click didnt through any response after click.
any help will appreciated.
Kind regards
Hi Hassan,
Besides using something more elegant, if possible, I would like to add that the extended properties of a widget are for add atributes to the HTML element used.
If you wants to run javascript, the standard way in OutSystems can be seen here: https://www.outsystems.com/forums/discussion/18166/how-to-call-javascript-function-on-button-click/
Cheers.
Eduardo Jauch wrote:
thanks eduardo, i was not calling and executing the javascript function. its giving the print preview option now, but i want to avoid the header and footer of the page also. how can i avoid them?
cheers
Hello Hassan I think you can use a component from forge that do it for you with more elegance. Take a look at these components:
Hope this helps.
Alexandre Costa wrote:
hi alexandre,
thanks for the reponse but that didn't worked for me. I have checked them.
is there any other solution without using the forge components like jquery, javascript or using the media queries in a right way? i dont have permissions to install the components into espace.
thanks
Hi hassan
Not sure. You can try one of the solutions here: https://stackoverflow.com/questions/8228088/remove-header-and-footer-from-window-print
Or try to google it a little more ;)
Cheers
Hi eduardo,
yeah i tried this solution. But i dont know how to run the "@media queries" in outsystems. I just wrote the media queries in the CSS of the web screen that needs to be printed but still no effect on the layout while print option.
how can i achieve this?
Hassan wrote:
Did you find any solution for that? I have similar requirement to print page but not getting many option out there.
Regards