Jump to content
We've recently updated our Privacy Statement, available here ×

jmurray

Members
  • Posts

    401
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by jmurray

  1. This is a duplicate post. Please refer to this post for followup items: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=20033&catid=9 . Post edited by: jmurray, at: 2007/01/12 07:13
  2. It could be that you've inadvertently erased the Key value for one or more of your elements. Normally iReports will automatically insert a Key value of "Element-xx" for each element as it is inserted into the report. Key values are found on the Common tab of the Element Properties dialog box, as shown in the attached jpg. size=371]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/KeyValue.jpg If you have a large number of elements on your report then the easiest way to find the missing key value is to search the source xml for "reportElement" and make sure that each one contains a line like key="element-66" Please note that reports will normally compile properly regardless of whether elements are named or not. However you will run into compile problems if a scriptlet refers to an element by key value, or if an element references a style. . Post edited by: jmurray, at: 2007/01/12 04:26
  3. Can you post a jpg of a printscreen marked up (use MS-Paint or some other drawing program) to show what is happening and what should be happening pls?
  4. Getting your casting right is imperative in all expressions except for some java.lang.String expressions where you can simply enter the literal string in double quotes without having to cast. So your BigDecimal's expression should read something like: new java.math.BigDecimal( $F{DEBIT_BEFORE}.doubleValue() - $F{CREDIT_BEFORE}.doubleValue() ) or new java.math.BigDecimal( $F{DEBIT_BEFORE}.subtract( $F{CREDIT_BEFORE}.doubleValue() ) ) . Post edited by: jmurray, at: 2007/01/11 07:58
  5. You can do this with two methods. The first method would be to include the labels in your query. Then it's just a simple matter of displaying them in a Text Field box. The static method would again involve a Text Field box, but this time holding static strings that are displayed under certain conditions. This TextFieldExpression displays "Initial Transmission" on the first row of a group, and "Retry" + (row number -1) on subsequent lines: ($V{yourgroupname_COUNT}.intValue()==1 ? "Initial Transmission" : "Retry" + ($V{yourgroupname_COUNT}.intValue() -1) ) Post edited by: jmurray, at: 2007/01/10 21:45
  6. Your main report does not have a recordset, and is therefore empty. That means you will get a blank report. To fix this you will need to put a dummy query like SELECT 1 AS DUMMYFIELD FROM DUAL into the body of your main report. NOTE: This is a most inelegant solution. It works but it's kinda clumsy in that you need to display the result of the dummy query to force the report to fill. ericknit's suggestion (below) to set the When no data Report Property to "All selections no Detail" is a much better way of achieving getting a blank main report to display so that subreports can be seen. Post edited by: jmurray, at: 2007/01/11 21:56 Post edited by: jmurray, at: 2007/01/11 21:57
  7. Perhaps you could post your SQL query and the error text to make it easier to work out what might be going wrong.
  8. This is a duplicate post. Please refer to post http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=12664&catid=9 for any follow up.
  9. Have a look at http://www.jasperforge.org/index.php?option=com_mamblog&Itemid=109&task=show&action=view&id=228&Itemid=109 as it may provide some clues. Although the example discusses Text Fields the principles remain the same because subreports will automatically grow to accommodate all data. So you don't need to worry about "Stretch With Overflow" as described in the example: it happens automatically. What is important is that: * the first subreport is Fixed Relative to Top * subsequent subreports are set to Float * all subreports are given a small vertical size (say 20 pixels) in the report design. JasperReports will automatically rezise them during the fill. If you try to guess the size that they need to be at design time you'll usually end up with layout problems in the report output. . Post edited by: jmurray, at: 2007/01/10 10:34
  10. One other thing to remember when working with sub-reports is that you have to recompile any sub-report when you change the source xml. This is because the jasper engine will be looking for a precompiled .jasper file, not the source xml/jrxml file. I have attached a sample report with two subreports and sample output. Both subreports display exactly what they are supposed to display. I hope you can find something in the sample to help you with your problem. The zip file contains 3 x jrxml and one pdf that will extract to C:ReportsDigiTollPROXY [file name=Protocol.zip size=5675]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Protocol.zip[/file]
  11. This is a duplicate post. Please use this post http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=19909&catid=9 when posting replies. . Post edited by: jmurray, at: 2007/01/09 22:55
  12. Possibilities include: * You've inadvertently forgotten to pass the paremeter to the second subreport. Check your sub-report's properties and make sure the parameter(s) are correctly defined. * The parameter has been omitted from the query for some reason. Check you sub-report's SQL query and make sure it makes use of the parameter. * The parameter value used results in an empty record set. Run the query in the database environment (rather than through iReports) to make sure it works. Substitute a static value for the $P{yourParametersName} in the query. * The SQL always returns an empty recordset. Make sure your query returns some values even when you remove the clause that includes the parameter. * This might sound silly, but misteaks do happen: check the data source for your textfields is set properly. When you're busily copying and pasting it's easy enough to forget to set the Text Field Expression.
  13. Just to be perfectly clear, what luciano said was to set the Detail band's height to zero
  14. You would think that it would be a simple matter of setting the Stretch Type to "Relative to Band Height", but guess what... it doesn't work. Short of a scriptlet there doesn't appear to be a solution in iReport
  15. It's a group footer: it will print every time a distinct Status group's detail has been filled. For more information on groups consult the iReports and/or JasperReports manual, available here: http://www.jasperforge.org/index.php?option=com_docman&task=cat_view&gid=79&Itemid=248 or check out one of the tutorials. Eg.: http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Groups_viewlet_swf.htm
  16. This is a simple group calculation. Set up a new group called STATUS and set its Group Expression to $F{Status}. Then define a new variable as follows: Variable Name - AMOUNT_TOTAL Variable Class Type - java.lang.Double Reset Type - Group Reset Group - STATUS Variable Expression - $F{Amount} Inital Value Expression - new java.lang.Double(0) You don't need any group headings, so set the Group Header band height to zero. In the Group Footer you need two text fields, one for the group record count and one for the sum of amount totals. Set the record count text field up as a java.lang.Integer, and set its Textfield Expression to be the internal variable $V{STATUS_COUNT} which contains the number of records in each instance of the STATUS group. And last of all set the Amount subtotal text field up as a java.lang.Double, and set its Textfield Expression to be your calculated variable $V{AMOUNT_TOTAL} That will get all your groups totalled up. That just leaves you to have a go at calculating the Grand Totals. The principle is exactly the same. Post edited by: jmurray, at: 2007/01/08 10:56
  17. Essentially no because all the data is hardcoded into the query, BUT you will need a valid Oracle or mySQL database connection available before it will work. Alternatively you can provide your own data source. Enough sppon feeding for now. Have fun.
  18. I managed to generate a InvocationTargetException by creating a duplicate field definition. When the compiler fails with this type of exception (wrapper) you need to scroll down through the exception log to find the root cause. In my case it was very clear: net.sf.jasperreports.engine.JRException: Duplicate declaration of field : ReceiptNum
  19. sorry... duplicate post! Post edited by: jmurray, at: 2007/01/07 23:26
  20. A solution was posted on the iText boards in 2002: http://sourceforge.net/mailarchive/message.php?msg_id=1989409 These properties have since been implemented in iText's ColumnText.class and PdfPCell.class, but iReport doesn't support them.
  21. Sample Solution Output: [file name=mortozo.pdf size=1718]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/mortozo.pdf[/file]
  22. Sample Solution [file name=mortozo.jrxml size=12498]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/mortozo.jrxml[/file]
  23. First check that the justification is the same (eg. all right justified) on all text boxes in the same column.
  24. Are you sure iReports is freezing? There are some scenarios which can cause it to chew up 100% of cpu. Open Task Manager next time it happens and see if you're running at very high cpu usage.
  25. AFAIK you can't do it within a crosstab context. You would need to set up a subreport that simply calculates those two values and returns them for you to manipulate in whatever way you want. If you need to display the values and the result of the subtraction as if they were part of the crosstab then you would use the crosstab editor to delete the total fields that you want to replace and then put Text Fields directly under the crosstab to display things as you need. . Post edited by: jmurray, at: 2007/01/06 10:35
×
×
  • Create New...