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

dman

Members
  • Posts

    22
  • Joined

  • Last visited

dman's Achievements

Explorer

Explorer (4/14)

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

Recent Badges

0

Reputation

  1. hi all i wonder if there is a possibility to display a string value instead of numeric value on the y-axis in a chart? basically the y-axis values are numbers. in my case these numbers can be interpreted as string values, e.g. 2 = "normal", 3 = "minor", 4 = "major", 5 = "critical". what i tried is to use the property "value axis tick label mask" for this. but it seems i can only use this in order to format a numeric value. thus, what i need is a possibility to call a method like String statusToString(Numeric value) which returns a string representation of the numeric value passed to the method. i'm afraid i'll have to use a JRAbstractChartCustomizer. Actually it is not the problem, i used this workaround before. what i'd like to know..... is there a by any chance a possibility to set the y-axis tick descritption via chart customizer? thx in advance for any hints regards dman
  2. i'm not sure... there might be a better (simpler) solution yet, but if you still decide to use a chart cutomizer:... 1) define your chart customizer as described above public class MyChartCustomizer extends JRAbstractChartCustomizer { .... } 2) create your chart within iReport 3) select this chart; define the path to your chart customizer class (with full package name) in the properties pane (properties -> common chart properties -> customizer class): "the.path.to.my.customizer.MyChartCustomizer" 4) add the folder/jar where your package is located via menu: options -> classpath
  3. hello is jasperreports subject to the us export administration regulation (EAR) and has therefore an Export Control Classification Number assigned? thanks for any information in advance regards dman
  4. Indeed, since the creation of reports is only a part of a bigger project, the compilation target is invoked every time the application is run. The .jrxml files and the .jasper files are located in the same directory. Thank you for the hint. It might be a good idea to store them in separate locations, I guess. Additionally I will implement a method which compares the design files and the corresponding jasper files and starts the compilation only if required, i.e. if the design files are newer than the compiled reports. regards, dman
  5. hi all, in my application i use JRAntCompileTask to compile my report design files (jrxml). the problem is, even if the design file does not change, repetitive execution of the JRAntCompileTask produces different jasper files. I used a diff utility to check what the difference is and found out that the name of the temporaray java file varies from compilation to compilation. I set the flag "keepjava" to "false" but it only does not keep the java files, the java file name is still written into the jasper file. Has anyone an idea how to change the ant task to get identical jasper files from identical jrxml files? Thanks for any help in advance, regards, dman Code:<target name="compile.jrxml" description="Compiles the XML report designs and produces the .jasper files."> <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask"> <classpath refid="class.path"/> </taskdef> <jrc destdir="${root.server}/reports" tempdir="${java.io.tmpdir}" keepjava="false" xmlvalidation="true"> <src> <fileset dir="${root.server}/reports"> <include name="*.jrxml"/> </fileset> </src> <classpath refid="class.path"/> </jrc> <echo message="Report designs compiled in ${root.server}/reports"/> </target>
  6. hi, i use a static image as a header in my report. The image is larger than the page width, so I use the option "retain shape" to scale the image down. The image is displayed if I view the report with the JasperViewer or export the report to pdf, but the image is not shown if i export the report to html and it is not written to the directory specified by IMAGES_DIR. But in the case I choose the scaling option "fill frame" the image is displayed (and is writen to the IMAGES_DIR). Any idea what's wrong here? Thanks for any help.
  7. hi, i can't find the possibility to keep the code generated in the compilation process. i use iR v3.5.0. i googled it and found some hints to set this option under properties | compilation, but i cant find this option. however there is a property "net.sf.jasperreports.compiler.keep.java.file" under options | JasperReports Properties but it is not editable. any hints? regards, dman
  8. if you know the number of parts within your text, you could assign your your text to a String variable (such as $V{myText}) and use it this way: text1 = $V{myText}.split("/")[0] text2 = $V{myText}.split("/")[1] text3 = $V{myText}.split("/")[2] textN = $V{myText}.split("/")[n] regards, dman Post Edited by dman at 05/18/2009 07:53
  9. hm, no idea. I use scriptlets and a JRBeanCollectionDataSource as data source expr. for my subreport. All my reports and scriptlets (in a subdir) are in folders, i.e. I don't use jars at all and everything works fine. regards, dman
  10. Given your report is called “MyReport”, create a resource file “MyReport.properties” (or “MyReport_en.properties”, “MyReport_de.properties”, … ) . Within the properties file define then whatever you want to internationalize, e.g. “reportName=Mein Bericht”. Define the ‘resource bundle’ property (“<pathtoyourresourcedir>.MyReport”) in iR and use your localized value for your text field expr. like this “$R{reportName}”. Maybe you’ll have to add the resources path under options | classpath. HTH, dman Post Edited by dman at 05/12/2009 09:14
  11. amazing.... i don't know how but it works:-) anyhow i think it is better to use a customizer class to get the job done: public class BarChartCustomizer extends JRAbstractChartCustomizer { public void customize(JFreeChart jFreeChart, JRChart jrChart) { CategoryPlot catPlot = jFreeChart.getCategoryPlot(); final NumberAxis rangeAxis = (NumberAxis) catPlot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); } } br, DM
  12. hi all, i want to reuse the sql query from the main report but i don't want to use a subreport or a crosstable. thus i defined a parameter $P{sqlQuery} which contains the sql query. my intention was to pass this parameter $P{sqlQuery} defined in the main report to my subdataset. i defined a parameter $P{sqlQuery_sub} for the subdataset but it is not possible to assign the parameter $P{sqlQuery} from the main report since main report parameters are not visible/accessible. any solution for this issue? thx in advance for your help, DM
  13. hi all, any idea how to configure the axis range of a bar chart to display only integer values? what i get is: 0.1, 0.2, ... 1, ... 3 values (see appended image). do i need to use a customizer class? i read in a post a short while ago not to use the customizer classes (deprecated??) but to use chart themes. what is then the correct way to use a theme to configure the axis ticks in order to solve my problem? thanks for any help in advance regards, DM
  14. finally, I stumbled across this in the jfreechart guide: "The renderer automatically calculates the width of the bars to fit the available space for the plot, so you cannot directly control how wide the bars are.". (though it is possible to set the max. bar width) Has anyone an idea how to sort this out? Maybe a workaround? regards, DM
  15. I’m trying to figure out how to get the (bar) char enlarged dynamically. I set the orientation parameter to “horizontal” and want the chart to grow in height with every new row. It seems that the chart retains its height size regardless of how many rows the corresponding data set contains. The more rows it has the more it is scaled down and the chart becomes hard to “read”. In the appended figure you see the effect I mean. Is there a possibility to set a constant size for a bar width so that the chart enlarges proportionally as needed? Do I have to use a chart customizer class for this purpose? I tried to set different “stretch type” parameters with no effect. Thanks in advance for any help, DM
×
×
  • Create New...