struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adam pinder <apin...@hotmail.co.uk>
Subject RE: Integrate JasperReports into a Struts2 web application
Date Thu, 17 Feb 2011 17:33:40 GMT


someone posted this online, not sure if it'll work for jasper report as source
<html>
<head>
<script>
function doit() {
var x = document.getElementById("doodad");
x.click();
x.setActive();
x.focus();
x.print();
}
</script>

</head>
<body>
<embed id="doodad" src ="D:\Documents and
Settings\ron\Desktop\eth_cli.pdf" width="550" height="550"
name="whatever">
<button onclick="doit()">howdy</button>
</body>
</html>

> Date: Thu, 17 Feb 2011 09:28:33 -0800
> From: nagarjunabattula@gmail.com
> To: user@struts.apache.org
> Subject: RE: Integrate JasperReports into a Struts2 web application
> 
> 
> k but please send me the code please.
> i might get any idea by seeing dat naa..
> please
> 
> adam pinder wrote:
> > 
> > 
> > 
> > its specific to pdfs and won't be any different to window.print on a
> > normal web page
> > 
> >> Date: Thu, 17 Feb 2011 09:22:33 -0800
> >> From: nagarjunabattula@gmail.com
> >> To: user@struts.apache.org
> >> Subject: RE: Integrate JasperReports into a Struts2 web application
> >> 
> >> 
> >> inside a pdf able to print???
> >> ok can u please send that java script file to
> >> me.(nagarjunabattula@gmail.com)
> >> 
> >> adam pinder wrote:
> >> > 
> >> > 
> >> > 
> >> > i think all interactions using window.print require the user to at
> >> least
> >> > acknowledge that they want to print. i've only used javascript inside a
> >> > pdf to be able to print without user interaction but even that has been
> >> > deemed a security risk and so is also frowned upon.
> >> > 
> >> >> Date: Thu, 17 Feb 2011 09:03:05 -0800
> >> >> From: nagarjunabattula@gmail.com
> >> >> To: user@struts.apache.org
> >> >> Subject: RE: Integrate JasperReports into a Struts2 web application
> >> >> 
> >> >> 
> >> >> ok adam am also thinking that only.
> >> >> so can you tell me is it possible to print the report directly when
i
> >> >> press
> >> >> ok button . in this ok button the function am giving is
> >> >> window.open(action
> >> >> urlx). so i want a report if it dont display even it is not a matter
> >> but
> >> >> i
> >> >> need print out directly should go to the printer.
> >> >> simply sending the report directly to the printer without any user
> >> >> interaction after pressing ok.
> >> >> can u help me regarding this
> >> >> 
> >> >> 
> >> >> adam pinder wrote:
> >> >> > 
> >> >> > 
> >> >> > 
> >> >> > window.open is not a synchronous command and hence the window.print
> >> is
> >> >> > occurring before the jasper report is actually rendered and you
need
> >> to
> >> >> > issue the window.print on the new window which i doubt it is given
> >> >> you're
> >> >> > calling it from the parent window.
> >> >> > you need to be able to test that the new window is loaded first,
> >> then
> >> >> > issue a print on the new window.
> >> >> > 
> >> >> >> Date: Thu, 17 Feb 2011 02:44:44 -0800
> >> >> >> From: nagarjunabattula@gmail.com
> >> >> >> To: user@struts.apache.org
> >> >> >> Subject: Re: Integrate JasperReports into a Struts2 web application
> >> >> >> 
> >> >> >> 
> >> >> >> hello sir,
> >> >> >> 
> >> >> >> in my java script file am calling action as follows and it
displays
> >> >> the
> >> >> >> jasper report.
> >> >> >> 
> >> >> >> window.open("itemsNotInPackageReport.action?branchName=" +
> >> >> >> $('select#branchName option:selected').val());
> >> >> >> 
> >> >> >> so now i want to send this to printer directly when i am calling
> >> >> action.
> >> >> >> Is it possible???
> >> >> >> 
> >> >> >> i ve used like this also
> >> >> >> 
> >> >> >> window.open("itemsNotInPackageReport.action?branchName=" +
> >> >> >> $('select#branchName option:selected').val());
> >> >> >> window.print();
> >> >> >> 
> >> >> >> but it is printing the empty page but generating the report
> >> >> successfully
> >> >> >> 
> >> >> >> action in struts.xml
> >> >> >> 
> >> >> >> <action 
> >> >> >>             	name="itemsNotInPackageReport" 
> >> >> >>             	method="getItemsNotInPackageReport" 
> >> >> >>             
> >> >> >>
> >> >>
> >> class="com.ae.school.web.action.sales.reports.ItemsNotInPackageAction">	
> >> >> >> <result name="itemsNotInPackageReport" type="jasper">
> >> >> >>             /jasper/sales/ItemsNotInPackageReport.jasper
> >> >> >>             itemNameList
> >> >> >>             PDF		     
> >> >> >>         </result>
> >> >> >>         </action>
> >> >> >> 
> >> >> >> please help me its urgent for me
> >> >> >> 
> >> >> >> -- 
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >> http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30948502.html
> >> >> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >> >> >> 
> >> >> >> 
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> >> >> For additional commands, e-mail: user-help@struts.apache.org
> >> >> >> 
> >> >> >  		 	   		  
> >> >> > 
> >> >> 
> >> >> -- 
> >> >> View this message in context:
> >> >>
> >> http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30951544.html
> >> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >> >> 
> >> >> 
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: user-help@struts.apache.org
> >> >> 
> >> >  		 	   		  
> >> > 
> >> 
> >> -- 
> >> View this message in context:
> >> http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30951720.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >> 
> >  		 	   		  
> > 
> 
> -- 
> View this message in context: http://old.nabble.com/Integrate-JasperReports-into-a-Struts2-web-application-tp23479814p30951761.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message