Jump to content

sick35

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

sick35's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello evrybody, I have to create some reports, but I have to overwrite them ( overwrite the resultant .pdf ), always keeping the original name ( for example "1.pdf" ), is there any way ( parameter or any other thing I' m missing ) to do so? Maybe with JasperExportManager? Do you have a clue? This is the returned error: net.sf.jasperreports.engine.JRException: Error trying to export to file : 1.pdf at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:389) at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:122) at controldel.CuentaCedular.verSolicitudCuentaCedular(CuentaCedular.java:256) at controldel.CuentaCedular.guardaDatosCuentaCedular(CuentaCedular.java:1903) at controldel.CuentaCedular.access$500(CuentaCedular.java:50) at controldel.CuentaCedular$5.actionPerformed(CuentaCedular.java:645) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at org.jvnet.substance.utils.RolloverButtonListener.mouseReleased(RolloverButtonListener.java:109) at java.awt.Component.processMouseEvent(Component.java:6041) at javax.swing.JComponent.processMouseEvent(JComponent.java:3265) at java.awt.Component.processEvent(Component.java:5806) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4413) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4243) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2440) at java.awt.Component.dispatchEvent(Component.java:4243) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at controldel.PopUpEventQueue.dispatchEvent(PopUpEventQueue.java:61) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) Caused by: java.io.FileNotFoundException: 1.pdf (La operación solicitada no se puede realizar en un archivo con una sección asignada a usuario abierta) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131 ) Perhaps you should know that there's always a previous "1.pdf" file, which should be overwritten Thanks
  2. Hello everyone! I'm trying to perform a sum of five values returned from equal number of subreports. The subreports work fine in the master report (I can see their results)... But the problem is when getting values from them, ('Return Values'). I created one variable (integer data type) on each subreport that gives total of records from each subreport and want to make a sum of them on a variable : new Integer( $V{varDespachoARegional}.intValue() + $V{varDespachoAConsulado}.intValue() + $V{varRegionalARegional}.intValue() + $V{varRegionalADespacho}.intValue() + $V{varRegionalAConsulado}.intValue() ) I set this formula in the 'Variable Expression' field of the variable, but it prints only a "null" as a result in the master report. Am I missing something, or is something wrong? Thanks for your help
  3. Right answer was : new java.text.SimpleDateFormat("dd 'de' MMMM 'del' yyyy").format(new java.text.SimpleDateFormat("yyyyMMdd").parse($F{FechaOficio})) Thanks anyway
  4. I have problem formatting a date (passing from one format to another). I'm filling a variable $V(fechaConvertida) with the new format applied to a field... For example: "20100617" --> field("yyyMMdd") and I want to format to "17 de junio del 2010" --> variable("dd 'de' MMMM 'del' yyyy") I know it's something about the format, but I cant get to it... This is the error that iReport returns : Error filling print... Error evaluating expression : Source text : new SimpleDateFormat("dd 'de' MMMM 'del' yyyy").format($F{FechaOficio}) net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : new SimpleDateFormat("dd 'de' MMMM 'del' yyyy").format($F{FechaOficio}) at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:259) at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:580) at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:179) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:789) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1478) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:125) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:942) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.IllegalArgumentException: Cannot format given Object as a Date at java.text.DateFormat.format(DateFormat.java:281) at java.text.Format.format(Format.java:140) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:754) at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:765) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:753) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167) at rptConsulados45OficioParaEnvioDeCedulasAConsulado_1276802333611_519434.evaluateEstimated(calculator_rptConsulados45OficioParaEnvioDeCedulasAConsulado_1276802333611_519434:467) at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:246) ... 13 more Print not filled. Try to use an EmptyDataSource... Post Edited by sick35 at 17/06/2010 14:19 Post Edited by sick35 at 17/06/2010 14:21
  5. I'm trying to make a report that has the following Bands : Title, Page Header, Detail 1, Page Footer and Last Page Footer. The Title band, and the Page Header bands are almost alike, but they display depending on what page is the report on.The Title is only displayed in front page of report, or in my case 1/3 of the first page. Page Header is only printed in the next pages starting on number 2. For that i use the following.... $V{PAGE_NUMBER} > 1 on the Print When Expression property of this band. By the way, the editor for this option underscores the '1' in the expression, so I think its an error I may correct, isn´t it? When I preview the report it appears ok, but just before PageFooter and Last Page Footer (in the second page) there´s a blank space that I want to get rid of.... Does anybody knows what causes this behaviour? Is it related with the $V{PAGE_NUMBER} > 1 I'm putting in the condition??? I'm attaching a pdf file, the error is on the second page.... Thanks for any kind of help. Best regards Post Edited by sick35 at 17/05/2010 15:38 Post Edited by sick35 at 17/05/2010 15:42
  6. I'm having the same problem, the difference is that I'm using SQLite JDBC connection. Can't add fields to my report in iReport 3.7.1. I see them, but can't add them... Someone can help? thanks
×
×
  • Create New...