Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
call print dialogue box along with pdf report
subbu2ats
i am calling simple report from jsp using framset and formate=pdf. so report is opend fine in pdf formate.
if i want to take the print i need to click on print icon in toolbar of pdf but i dont like this. i need
print dialogue window should call automatically along with the pdf like how the print dialogue window called
along with the html format.
plz let me know is there any way like this..
Find more posts tagged with
Comments
JasonW
Right now this is handled by the viewer AJAX code. You can modify the framesetfragment.jsp to broadcast a print event which will launch the print window. For example add the following to the bottom of the framesetfragment.jsp right above the last </script> tag:
<%
if( request.getParameter("print") != null )
{
%>
birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT );
<%
}
%>
</script>
Then in the url add &print=true
Jason
subbu2ats
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="76801" data-time="1305035347" data-date="10 May 2011 - 06:49 AM"><p>
Right now this is handled by the viewer AJAX code. You can modify the framesetfragment.jsp to broadcast a print event which will launch the print window. For example add the following to the bottom of the framesetfragment.jsp right above the last </script> tag:<br />
<br />
<%<br />
if( request.getParameter("print") != null )<br />
{<br />
%><br />
birtEventDispatcher.broadcastEvent( birtEvent.__E_PRINT );<br />
<%<br />
}<br />
%><br />
</script><br />
<br />
Then in the url add &print=true<br />
<br />
Jason<br /></p></blockquote>
<br />
<br />
<br />
<br />
Thansk for your quick reply<br />
<br />
Actually i dont want that window. i need the printout winodow for which we need to select printer name...<br />
<br />
<br />
plz check the attachement for window wich i want along with pdf report<br />
<br />
Thansk & Regards
JasonW
In html you can do just a window.print. In pdf some javascript needs to be added to pdf, which birt does not support, but if you use the apis you add it using the iText libraries that come with birt.
Jason