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

bklawans

Members
  • Posts

    122
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by bklawans

  1. bklawans

    Charts

    The webapp example does run in a war - try typing "ant war". Take a look at the HTML of the web page without the chart and take a look at what the img tag is using as the source of the image - that should give you a pretty good clue. You may alse need to run your appserver with JDPA enabled and use a debugger to figure out what is going on in your environment. -Barry
  2. Have you tried putting the first subreport in the title band and setting the "isTitleNewPage" to true? That might work. If that doesn't do it, put the first subreport in the title band and create a bogus group. Set the group expression to something like "A" so there is only one grouping, and set the groups "isStartNewPage" option to true, then place the second subreport inside the group. -Barry
  3. JasperReports currently only supports the default Java sRGB color space. The Java imaging libraries have support for CMYK, but I don't know how widely supported it is. For instance, the PDF library we use (iText) ended up writing its own implementation of the CMYK colors, which makes me guess that the built in support is minimal. I also don't know if the charting package supports CMYK. I guess its doable, but nobody has done it to date. Want to volunteer? :) Java has very poor support for spot colors, so that would be a significantly harder effort. The standard constructors for custom colors take a color space and a bunch of floating point numbers, so that won't handle spot colors, where I imagine the color space would be something like "PANTONE" and the color definition would be a string. -Barry
  4. bklawans

    Charts

    Take a look at the webapp sample that is included with JasperReports. in the html.jsp page you can see there are some options to the JRHtmlExporter that need to be set to support images properly. -Barry
  5. The ability to specify series colors in charts is coming soon, hopefully 1.2.7. Then you can specify bar colors without writting any Java code. The Label expression allows you to specify an optional description of the axis, for example "Total Freight", "Country", etc. It gets displayed next to the axis line in the chart. Finally, our charting engine doesn't allow you plot dates, only values. On the other hand, dates really are numeric - try plotting $F{datefield}.getTime(). Currently the y axis won't show the value as a date, but the same release with color support will add the ability to format the axis tick mark labels, so then you will be able to convert the long back into a time. -Barry
  6. Take a look at the webapp sample that is included with JasperReports. The html.jsp shows some options to the JRHtmlExporter that need to be set for the images to work correctly. (Take a look at the HTML returned from the servlet and you will probably see that the image tat used for the chart is wrong.) -Barry
  7. timmyd wrote: Thanks Barry. The dual-y axis is a requirement that I have too, so I look forward to the final product. Tim I've got all the development work wrapped up, and as soon as JR/iR 1.2.6 get through QA and released I'll check the code in. I decided to hold off putting it into 1.2.6 since Giulio won't have time to add support in iReport. I'll post a followup when its checked in and folks can grab the latest code to play with it, assuming they can live without iReport support for a little while. -Barry
  8. If you are running on a *nix system you either need an X11 server or to run in headless mode. Search the forums for instructions on how to do this. -Barry
  9. ant javac ant compile ant fill ant view ant pdf
  10. bklawans

    Charts

    Here is what I get. Do you see any error messages anywhere? -barry
  11. bklawans

    Charts

    Take a look at the attached version. -Barry
  12. Brute force might be the best answer then. Create a String field with the expression: Code: new String ( ($F{totalTime}.longValue() / 3600) + ":" + (($F{totalTime}.longValue() % 3600) / 60)) or something to that effect. If totalTime is milliseconds and not seconds just replace the hard coded constants with 3600000 and 60000. -Barry
  13. Are you getting any errors from Oracle when you pass the date in as Date objects? I've done this with Oracle 9i without any trouble. If you pass the parameters as Date's, JasperReports simply tells the JDBC driver that there is a date param and set the Object you passed. The driver converts the date to a format the db engine understands, so the locale's date format shouldn't matter. Converting to a string manually should be OK, as long as you do it in a way that gets called before the query is executed. Declare a new parameter of type String that has a default value of the expression that uses a SimpleDataFormat to convert to a string, and use that parameter as part of your query. The exact error you are getting from Oracle would be a big help. -Barry
  14. The -djava.awt.headless=true option still uses the X11 libraries, it just doesn't require a running X server. The end results are the same No bad effects that I have encountered. I imagine it uses a bit more memory, since the font metrics, etc are loaded into it via the Xlib instead of being retained on the X server. Just a guess though. -Barry
  15. bklawans

    Charts

    I see. You need to create a group that changes when the ages change, and add an "order by" clause to the query so that the data comes back sorted by age. Then use the $F{age} as the key of the pie chart and $V{groupname_COUNT} as the value. If you don't want the data in the table to be sorted by age, create a second query (dataset) for the pie chart to use. If you go that route you might as well use "group by" to select the age and the counts directly from the RDBMS and not bother creating a group. -Barry
  16. bklawans

    Charts

    It looks like the problem is with the empty <incrementWhenExpresion></incrementWhenExpression> that is in both chart's datasets. If I remove them you report runs and both charts display. I'll take a look and see if its a bug in JasperReport. Also, I'm not quite sure what you want pie chart to show, but as it written it will have one slice named "Ages". You should change the keyExpression to be $F{Name}. -Barry
  17. bklawans

    Charts

    I'm a little unclear on what the issue with the bar chart is - is it not creating the chart correctly, or is it working but the tick marks on the axis are not what you want? On the pie chart demo - does anything show up? Is the demo database running? Any errors reported? Some info on what version of iReport, JaserReports, the JVM, etc would help too. -Barry
  18. Is the data you need for both axes in the dataset? If so its pretty easy. When you create the second axis and add it to the plot you need to set the dataset to use for the axis too. Try adding plot.setDataset(1, dataset); plot.mapDatasetToRangeAxis(1, 1); right after your call to plot.setRangeAxis. -Barry
  19. The series expression gives a way to collect a bunch of data into a set, which is useful when you want to plot multiple things on a single graph, such as age and height. In this case you set the series to be $F{age} so it thinks you have a bunch of different data series. Set the seriesExpression to "Age", the category expression to "$F{name}" and the value to "$F{age}". That should help. -Barry
  20. You can make the report title band the size of a page and put your cover page inside of that. The title only appears at the vary beginning of a report, so if it is one page tall it will give you the cover page you need. -Barry
  21. BhaskarBV wrote: Thanks Barry. Is there any alternative or other ways that we can use stored procedures. Also any estimation on Query Executer Project. Please let me know. Thanks once again -Bhaskar Brian Burridge posted an article on his site about calling oracle stored procedures from JasperReports that gives an alternate method, but it involves modifying the stored procedure to use a temp table. I know Giulio is close to wrapping up a new release of iReport, but I can't remember if JRQueryExecuter support is in it or not.
  22. ajorgensen wrote: Giulio- I see that, but the problem is the fields that are returned from the "Report Query" all have the same name (no aliases are used in the stored procedure). when I click OK on Report Query, only the first field is added in the object library under "Fields". The fields are recognized as unique in "Report Query" by field type (by pressing "Read Fields") but are not given different names in that list. If I add the list of fields manually under "Fields" and set the appropriate "Field class type", as soon as I change the query and press ok the list of fields is blown away and replaced with the original single first field. Are you saying that the columns don't come back with unique names? If so, that sounds like a bug in the Informix JDBC driver. I haven't used Informix for many, many years, but I remember that their C API gave columns coming back from a stored procedure unique (but meaningless) names. The C API was a very thin level above their wire protocol, so I'm guessing for some reason the JDBC driver is ignorning them and giving every column the same name. I did a quick scan through a copy of the Informix JDBC driver manual and found a section on where their driver behaves "differently than specified by the JavaSoft specification", a nice way of saying "spec violation". Amoungh the differences is that DatabaseMetaData.getProcedureColumns() ignores column names. Sounds like a big problem with stored procedure column names in the driver to me. The doc I was looking at was over 6 years old - is there a newer version of the driver available? -Barry Post edited by: bklawans, at: 2006/08/25 17:05
  23. All the bars in a single series will be the same color. Otherwise if there is more than one series you won't be able to tell which bars go with which series. -Barry
  24. The code is up. There is now a public project in the Developer Forge section of this site called OracleStoredProcedures that has all the code you need. Have fun! -Barry
  25. I just created a project with a sample custom query executer that support Oracle stored procedures that return results via a cursor. You can find it on the Developer Forge section of this site, project "OracleStoredProcedures". Currently iReport doesn't support query executers, but Giulio is working on it. Giulio, any estimates on when it will be available? -Barry
×
×
  • Create New...