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

peter.galeingres.com

Members
  • Posts

    26
  • Joined

  • Last visited

peter.galeingres.com's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi, The image and sub-report both need to be uploaded to Jasperserver as well. The easiset way to acheive this is through the plugin to iReport. When you upload a report via the plugin all its sub-reports, images and other dependencies are uploaded as well. The plugin will also adjust the expressions to the server syntax such as repo:logo.jpg If you upload the image and sub-report manaully and you put them in some central folder such as /Images the expression will need to read. repo:/Images/logo.jpg Hopefully this will point you in the right direction. Peter Gale Ingres Corporation
  2. Hello, You can put the formatting in the Element expression using a conditional expression. The condition is based on the field that defines the column groups in the crosstab. An example is ( $V{type}.equals("Money") ? new DecimalFormat("$#,##0.00;($#,##0.00)").format($V{value_Nothing}.doubleValue()) : $V{value_Nothing}.toString()) So this will format the string with a currency symbol if the column group is "Money". For any other group you just get the plain value. Note that we have to returns a string for consistency. Peter Gale Ingres Corporation.
  3. Hi Sasidhar, There are two answers to this depending on what the parameter is all about. In this example we display an image based on the value of a paratemer ( $P{severity}.intValue() == 1 ? "repo:Pass.png" : ( $P{severity}.intValue() == 2 ? "repo:Query.png" : "repo:Fail.png" ) ) The images in this cased are in the repository as resources of the report unit. They could of course be in a central Image folder in which case the URI would be something like "repo:/Images/Pass.png" The second answer is where the parameter actually contains the name of the image. Then the Image Expression would simply be "repo:/Images/"+$P{myimage}" or something similar. Hope that helps Peter Gale Ingres Corporation
  4. Hi Mike, This should do the trick $V{DURATION}.remainder($V{One}).multiply($V{Sixty} ).divide($V{Ten}).add(new java.math.BigDecimal($DURATION}.intValue())) I am assuming BigDecimal here and I have used variable for the literals 1, 60 and 10. This multiplies the decimal part by 60 and then divides by 10. This would turn 0.03333 into 0.19998. It then adds the whole hours onto this by casting to Integer and back to BigDecimal. The result is still 0.19998 but if you then set the pattern on the text field to ##.0# It will display as 0.2 Peter Gale Ingres Corporation.
  5. Hi Mounika, The only way I know to do this is to generate each chart using a subdataset (or subreport) as follows Main report has a query along the lines of SELECT sum(value) as total FROM data. $F{Total} is passed as a parameter (total) to the subdataset which will have a query along the lines of SELECT (100*sum(value))/$P!{total} as PCT, group_column from data GROUP BY group_column You can then use $F{PCT} as the value in your charts. Peter Gale Ingres Corportation
  6. Hi Mayuresh On the Image tab of the Properties dialog for the Image there is a 'Scale Image' option. Try setting that to 'Retain Shape'. Peter Gale Ingres Corportation
  7. Hi Tomaz, I think all you need is the !. SELECT * FROM X $P!{MY_ORDER} For reference the effect of $P!{...} is to substitute the value in the Parameter into the SQL string before it is executed. If the ! is missing the value is passed into the DBMS as a parameter and most DBMS's wont accept the order by clause as a parameter. Peter Gale Ingres Corporation
  8. Hi Henri, This should do the trick "Page " + ( ($V{PAGE_NUMBER}.intValue() % 2 ) == 1 ? "1" : "2" ) + " of 2" Peter Gale Ingres Corporation
  9. Can you post the jrxml please. I suspect you need to resize some of the bands in your report. Make sure that any bands you are not using are zero height and that the detail band is the same height as the fields it contains. Peter Gale Ingres Corporation
  10. This syntax should do the trick. new Integer ($F{Effort}.intValue() % 60) Peter Gale Ingres Corporation
  11. Hi, SimpleDateFormat returns a string because the various formats may not be ANSI standard date formats. java.util.Date only accepts ANSI date formats so you cannot vary the formatting of a date parameter. Your best bet is to apply the formatting to the field that displays they date. Peter Gale Ingres Corporation
  12. Hi Robin, new SimpleDateFormat("EEEE MMM dd, yyyy").format($P{Start Date}) + ' - ' + new SimpleDateFormat("EEEE MMM dd, yyyy").format($P{End Date}) Regards Peter Gale Ingres Corporation
  13. Hi Robin, It looks like you have all the bits in place but I dont think you need to include Parameters Map Expression: $P{REPORT_PARAMETERS_MAP} You will be passing the parameters by the subreport parameters part so this may be confusing things. Also double check your parameters to make sure they all match up (Case sensitive) Peter Gale Ingres Corporation
  14. Hi, Are you able to post the JRXML? Which header are you referring to, Page or Column? If you cant post the JRXML maybe an example of the output? Peter Gale Ingres Corporation
  15. Hi, There is no specific band for the sub-report, it depends on the purpose. A sub report in the detail band will be run for every row returned by the main query. If the sub report is not displaying then there are two possibilities 1) The main report query is not returning any rows. Unlikely becaue you would get 'Report contains no pages' 2) The Query in the sub-report is not returning any rows. Even if you place some statuc text in the detail band (or any band) of the sub-report it is still necessary for the sub-report to have a query that returns at least one row. Hope that helps Peter Gale Ingres Corporation
×
×
  • Create New...