Re: Link to dynamic pdf (jasperreports)
Hello lizz, i use the JRPdfResource this way. On bottom i added the output from the sysouts. This is exactly the path where my jasper file is located. But it's still empty. Can i output anything else, so that i see my mistake? ServletContext context = ((WebApplication) getApplication()).getServletContext(); final File reportFile = new File(context.getRealPath("/reports/booking confirmation.jasper")); System.out.println(reportFile.getAbsolutePath()); try { System.out.println(reportFile.getCanonicalPath()); } catch (IOException e) { e.printStackTrace(); } final JRResource pdfResource = new JRPdfResource(reportFile); Link pdf = new ResourceLink("pdf", pdfResource) { public void onClick() { super.onClick(); // do some additional stuff } }; The output is 14:41:50,041 INFO [STDOUT] C:\Programme\jboss-4.2.2.GA\server\default\.\tmp\deploy\tmp58981frontend-exp.war\reports\booking con firmation.jasper 14:41:50,041 INFO [STDOUT] C:\Programme\jboss-4.2.2.GA\server\default\tmp\deploy\tmp58981frontend-exp.war\reports\booking confi rmation.jasper Thanks 4 your help Per -- View this message in context: http://www.nabble.com/Link-to-dynamic-pdf-%28jasperreports%29-tf4936362.html#a14212787 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link to dynamic pdf (jasperreports)
Hi, Have you seen this other thread? http://www.nabble.com/wicket-File-downlaod-tf4874269.html#a13946961 There i've made some suggestions for dynamic generated pdf, with working code. Again, i don't know anything of jasper reports, but the person asked that time liked it. Also there is in the code the needed call to make it work with the download dialog. Bye, German It seems that Newgro wrote: > > Is this really unsolvable? Please can someone give me a hint? > > Thanks > Per > -- > View this message in context: > http://www.nabble.com/Link-to-dynamic-pdf-%28jasperreports%29-tf4936362.html#a14191604 > Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link to dynamic pdf (jasperreports)
Use a JRPdfResource The onResourceRequested() gives you a dialog with open report, save report or cancel buttons if you have set the filename Newgro wrote: > > Is this really unsolvable? Please can someone give me a hint? > > Thanks > Per > -- View this message in context: http://www.nabble.com/Link-to-dynamic-pdf-%28jasperreports%29-tf4936362.html#a14194722 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link to dynamic pdf (jasperreports)
Is this really unsolvable? Please can someone give me a hint? Thanks Per -- View this message in context: http://www.nabble.com/Link-to-dynamic-pdf-%28jasperreports%29-tf4936362.html#a14191604 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Link to dynamic pdf (jasperreports)
Hi *, i've read the threads for jasperreports-theme. But i don't get a glow for my task. I display a button at the end of a checkout process. This button represents a "Get as pdf". So it should be clicked and then the report should be generated. If generation succeeded zhe report should be managed with the "download" dialog. I do it this way until now, but my report is empty. Report located at /reports/report.jasper <--- compiled template public class ConclusionPanel extends Panel { public ConclusionPanel(String pId, IModel pModel) { super(pId, pModel); Label thx = new Label("thx", new ResourceModel("label.thx")); add(thx); ServletContext context = ((WebApplication) getApplication()).getServletContext(); final File reportFile = new File(context.getRealPath("/reports/report.jasper")); final JRResource pdfResource = new JRPdfResource(reportFile); Link pdf = new ResourceLink("pdf", pdfResource) { /** * @see org.apache.wicket.markup.html.link.ResourceLink#onClick() */ public void onClick() { super.onClick(); pdfResourceReference.setReportParameters(getParamsForCurrentReportDynamically()); }; pdf.add(new Label("pdfLabel", new ResourceModel("label.pdf"))); add(pdf); } } What am i missing? Thanks Per -- View this message in context: http://www.nabble.com/Link-to-dynamic-pdf-%28jasperreports%29-tf4936362.html#a14129410 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]