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

walmillard

Members
  • Posts

    49
  • 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 walmillard

  1. This is standard Java "In Line" IF THEN ELSE Statement The syntax is IF Condition ? Eval to TRUE : Eval to FALSE The key parts are the "?" and the ":" Question Mark after the Boolean condition. Colon between the TRUE/FALSE results. You can also nest these statements together eg IF Condition1 ? Result 1 TRUE : IF Condition 2 ? Result 2 TRUE : Result 3 FALSE In anser to your Question you need ELSE! add : and a False result. $F{TR}!=43?$F{Product}:F${TR} You may need to structure your Logic to account for BOTH true and false results. Luck!
  2. "NULL" is a String. null is the Java unassigned object. IF youre field is a Booelan Try this $F{BooleanFoo} == null?Boolean.TRUE:$F{BooleanFoo} == Boolean.TRUE?Boolean.TRUE:Boolean.FALSE If you want the null to be Boolean.FALSE then you need to change the Boolean.TRUE to Boolean.FALSE if the field is null you will get a true in lowercase in the field. If you have a string use this: $F{BooleanFoo} == null?"Boolean is TRUE":$F{BooleanFoo} == Boolean.TRUE?"Boolean is also TRUE":"Boolean is FALSE" if you have uppercase String NULL in the field or the dataset is returning this uppercase String as null then you need to change the IF condition to "NULL" ie $F{BooleanFoo} == "NULL"?... However if this is the case $F{BooleanFoo} will need to be declared as Type String in your report Field list. Luck!
  3. You might find that if you set the background color of the objects you are printing so you can clearly see which are causing the page metics to error. You might find there is some white space that is wrapping the page in error. Post some files?
  4. Are your PAGE field elements in the page footer or are they in another band?
  5. If the new Date() function returns the users current date/time then you can use the gettimezoneOffset() function to convert it. Otherwise pass a date opject as a parameter from your server to the (client) report. Java.util.TimeZone To get the GMT offset you can use an expression like : "Time Zone : " + new Date().getTimezoneOffset() Luck!
  6. Are you are Passing the system REPORT_COUNT in your subereport to a Parameter or Variable declared in your sunreport and then passing that value back to your master report? some things to check... I suggest you first add a Field object to your subreport and print that count value so you can see that the actual count number is correct/what you are expecting. Add another Field to your Master report as the result parameter/Varable to ensure that the number returning from the subreport is the same. Then you may need to check the "Evaluation Time" property of the return parameter and the Reset Type on the Varable as this can determine the result. Also you may want to check that you are not trying to determine the value of the return value before the subreport has set it. Luck!
  7. hazard a guess that the datasource within the subreport object on your main report is not quite right! You may want to check that out. Post some more deatails and we can have a look n see! Luck!
  8. In your subreport open the properties of the $F{CONNECTION_NAME} element within the Detail band and change the "Evaluation Time" property to "Now". Should fix it Luck! Post Edited by walmillard at 09/11/2009 02:29
  9. XML Datasources work on the XML standards so you simply need to point your datasource at the root of your XML datafile. Then move the cursor position to the correct node to output the data. Also you need to add the tag name to the Description property of the Field element. Your datasource to get the data and make it all work will depend on the complexity of your XML datafile and your xPath statement, Which is all garbled above. upload a file! Suggest you have a look at the example that ships with jasperReports and have a look at xPath tutorial here : http://www.w3schools.com/XPath/default.asp Luck! Post Edited by walmillard at 09/11/2009 06:10
  10. You could add some code in the ${Field} to handle the case where a null results... like this: $F{Foo} == null?0:$F{Foo} This will print the value in Foo or 0 (zero). Note Foo is an Integer Type, for a String type you would need "0". If you have a whole SQL Query that returns no data you can use the "No-Data Section" which is a band. From the Report Properties menu
  11. I have a parameter passed as a string and populated with the filename and this is printed in the footer of every report. When the file name changes with each version the report is clearly IDed. luck walmillard
  12. try inline if statement... like this: $V{TOTAL_NET}.intValue() > 0?Boolean.TRUE:Boolean.FALSE however the .intValue() will ignore the decimal part of the field, so perhaps you should use .doubleValue() instead?
  13. You may like to put the fields you would like repeated in the Detail band, OR establish a group condition for each set. luck W
  14. For may years i have been using iReport and each year my reports get more and more complex. Now i would like to use a relative xpath statement to expand on nested subreports. Is this possible? This is my XML <Foo> <Level1> <Level2> <Datatoprint A></> </Level2> </Level1> <Level1> <Level2> <Datatoprint B></> </Level2> </Level1> </Foo> With my main reports Select Expression to /Foo I would like to set my subreport to /Leve1/Level2[Data != ''] instead of /Foo/Level1/Level2[Data != ''] So that each subreport will only print from the node of the current position within the data? perhaps i should just download the source code write my own extension? W
  15. Yes. you need to create a counter variable, and create a group for your $F{Field}. Set the counter to SUM the $F{Field} group on change. luck W
  16. Mate have a look at the Style Text example shiped with iReport. What you will need is something like <style pdfFontName="Helvetica-Bold">$F{Name}</style> And have the check box is styled text checked! for italics is something like <style pdfFontName="Helvetica-Oblique">$F{Name}</style> for Bold and italics... <style pdfFontName="Helvetica-BoldOblique">$F{Name}</style> <style pdfFontName="Helvetica-Bold">$F{FName}</style> + " " + <style pdfFontName="Helvetica-Oblique">$F{SName}</style> etc luck w
  17. there are 2 things you need to set when u add a subreport to a main. 1) the subreport connection expression. ie ((net.sf.jasperreports.engine.data.JRXmlDataSource) $P{REPORT_DATA_SOURCE}).dataSource("/Myxml/Data[Foo != '']") NOTE the Xpath, this needs to point at your data. 2) the subreport expression. ie "MySubreport.jasper" This is the name of the compiled jasper subreport. luck walmillard
  18. Create a new Variable, Print_lens. Give it a value of $F{Lens_Focal} in the 'Print when' use the variable instead of the Field... new Boolean($V{Print_lens} != null) luck walmillard
  19. Add a new Header/footer band combo to ur main report and place each subreport within either the header or footer. Set the height to zero for the band u dont use. luck walmillard
  20. Steve, see my post on the old (and much better forum): http://sourceforge.net/forum/message.php?msg_id=3154935 luck walmillard
  21. why cant you use the self::node_name ? luck walmillard Post edited by: walmillard, at: 2006/08/25 01:14
  22. Yes, there is a bug in the way windoz renders True Type Fonts. It dates way back to when Apple and Co developed truetype font standards. Basicly what happend is micro$oft developed there "own" standard, then when win3.11 came out they made there Fonts metrix compatible with the industry standard by supplying 2 sets of matrix. But all the windoz programmers just used the "microsoft recommended" matrix. Which of course are crapy. You have to make allowances in the size of the Field to accomidate the correct font matrix for the OS you are deploying on. Its a pain. Later versions of Solaris have "fixed" there Font rendering to be "compatible" with the windoz bug. But not sure about L. luck walmillard
×
×
  • Create New...