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

itchytoes

Members
  • Posts

    210
  • 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 itchytoes

  1. Hi -- I got it working, and I believe the original ideas/suggestions posted were all correct. I'm not sure what I left out earlier. In any case, the following works: BarRenderer bsr = (BarRenderer) plot.getRenderer(); bsr.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator()); Font itemLabelFont = bsr.getBaseItemLabelFont(); bsr.setBaseItemLabelFont(itemLabelFont.deriveFont(new Float(8.0))); bsr.setBaseItemLabelsVisible(true); bsr.setItemLabelsVisible(true); I'm not sure if I need that call to setBaseItemLabelsVisible or not. Betty
  2. Hi -- thanks for the suggestion. I've actually been using Jfreechart 1.0.9 for my reports and I've done quite a bit of customization. For a line chart, I did use setBaseItemLabelGenerator(new StandardCatgetoryItemLabelGenerator()) followed by setBaseItemLabelFont() and setSeriesItemLabelsVisible() and I got labels showing over the point. My problem is with the stacked bar chart. I don't know if it is possible to get the value showing within the bar. I will fuss with it some more. Betty
  3. Hi -- I have a stacked bar chart for which I want the values to show within each of the bar sections. I once got the line charts to show values on the points by using a customizer class with setSeriesItemLabelsVisible(). Is there a way to do this with the stacked bar chart? Thanks Betty
  4. Hi -- I haven't checked this forum for a while, or I would have answered sooner. Regarding my calendar, I wrote a java scriplet method that is called at the beginning of the report to initialize a List variable that contained 12 entries, one for each month of my school year. Each entry itself was a List of days for month, representing the number to display on the calendar, where some entries are blank if nothing is to be displayed. Each month-list has 42 entries, to accomodate a maximum of 6 rows on a calendar with 7 days in each row. The method used all these various GregorianCalendar mehtods to figure out which days of the week fell on what date. I hope that gives you some sort of starting point. Betty
  5. Hi -- I've done a long narrow calendar that appears at the bottom of some reports. My calendar is always 12 months and spans from August of one year through July of the next year, representing the school year. I'm not sure if this was the best way to go about it, but I used some scriptlet code to fill up some ArrayList with the text (representing the date of the month) that I wanted to appear in each spot of the calendar. The arrayList represented all possible spots for every possible month configuration, so some spots will have blanks. I also had a separate ArrayList for school holidays. After that, I just had a bunch of rectangles and textfields for all the possible positions of my calendar and filled the spots accordingly with the right date and added a color for holidays. There might be easier ways to do this of course, but perhaps this gives you ideas. Betty
  6. Hi -- Under tomcat, I'm able to get a font based on TTF file to work by just making sure the ttf file is in the classpath so that the servlet, or whatever, that is running the exporter code will have access to it. I did not have to do anything special in the code. Betty
  7. Hi -- Try $P!{fd1} and $P!{sd1} and $P!{deptno} I'm not sure if that will solve your problem entirely. Are the fd1 and sd1 date strings with some kind of format? If they are strings, and your SQL will understand the query with the strings you give it, I think you may need single quotes around the $P!{fd1} and $P!{sd1}. I'm not entirely if single quotes are needed, but I always surround my string params with single quotes.
  8. Hi -- I'm not sure if this will actually solve your problem, but I do know that you can put conditionals in your <categoryExpresion>. for example, you can do <categoryExpression><![CDATA[$F{x}.equals("xx") ? "abc" : "xyz"]]></categoryExpression> However, you still do have lots of data points even if you divided up your axis differently, don't you? I'm not sure what happens to those points. Betty
  9. Hi -- I don't know if it's a good idea or not, but I have updated a goodly number of my libraries, such as itext and jfreechart, and some others. In one case, I needed a feature or something that was not in the older libraries. Nothing bad has ever happened yet. Betty
  10. Hi -- Is there a way you can detect your total time and then when you specify your <categoryExpression>, can you use an appropriate expression (hours or seconds) depending upon your total test time?
  11. Hi -- Maybe setting positionType="Float" for those header sections might help. Betty
  12. Hi Subreports always cause me grief with extra pages. There is some kind of artifact called "overflow with empty space" that can result in an extra page. Are all the subreports in one band? If so, can you adjust the band height so that the sum of all the heights of the reportElements in the subreports as well as any other reportElements within that band totals up to exactly the band height that contains them? Sometimes that helps me. Betty
  13. Hi -- Are those rows in a <group> If so, there is an isReprintHeaderOnEachPage option for the <group>. Is that what you want? Betty
  14. Hi -- I've been trying to find a way to include a method that is called once and only once per detail row. I've tried various things with <variable>, and I've tried some stuff with a <printWhemExpression> within a <detail>, but the methods are often called more than once. For example, if I try this: <variable name="Test" class="java.lang.Integer" calculation="Nothing"> <variableExpression><![CDATA[$P{REPORT_SCRIPTLET}.testing($F{edc_assessment_id})]]> </variableExpression> </variable> where my testing() method just returns an Integer, it seems to be called twice for every row. With some reports, however, it seems to work and something this is only called once. What is the best way to include a method that is called just once per detail? Thanks Betty
  15. Hi -- I'm still a little unclear on the isDataPreSorted flag. If this flat is set to true, and my data is NOT sorted, does any ordering take place? For simplicity's sake, let's say my rowGroup is just some names, and they are not returned in alphbetical order, but I set my isDataPreSorted to true. Does any ordering happen? or will my data row groups appear just as they are spewed forth from the result set? Thanks Betty
  16. Hi -- Okay -- I figured out my problem! I needed an equals() and a hashCode() also.
  17. Hi -- I could not figure out how to attach both files, so here's the MyWrapper.java
  18. Hi -- I am still struggling with this custom ordering thing. So, I created a simple MyWrapper class that I want to use to just switch the order of Integers (so that highest comes first). I modified the OrdersReport.jrxml from the jasper2.0.4 samples folder to just use this MyWrapper for columGroup bucketExpression. My order got swapped okay, but my cells are not showing data. There's too many zeros. I must be doing something stoopid, but I cannot figure it out. This is similar to my actual reporting problem, where my cells are showing as null when I try this custom ordering. I've attached the modified OrdersReport.jrxml and my tiny MyWrapper.java. I hope someone can help. BEtty [file name=OrdersReport-b76dd75c7cd3edd557d2b0690549c746.jrxml size=8701]
  19. Hi -- Have you checked out all the sample reports that come with the distribution? There's a bunch of chart reports there for all the various char types Betty
  20. Hi -- Thanks for the reply. this report and its subreports is so complicated that it is too time-consuming to try to isolate the problem. I made it work by turning the subreport into just one column, and then in the calling report dividing the data up so that the subreport is run twice, one for each half of the data. (I know that I will only have 2 columns max of data). I will go with that for now since I'm struggling with a different crosstab issue for a different report Betty
  21. Hi -- I'm currently struggling with a crosstab issue. I wanted to do a custom ordering for one of my column groups. I set isDataPreSorted="false". Then I followed the instructions in this posting to create an wrapper class that implements Comparable. The ordering of the columns works just swell, except that all my data has become null except for the first row! The first row's data is correct. It's just that all following rows have null data for my measures. What did I omit or do wrong?? Thanks Betty
  22. Hi - Once again, I am ending up with an extra blank page at the end if my subreport needs to go into its second column. (it was columnCount=2). I've already encountered the problem before with this artifact. I made that case work, and I thought I understood what I have to do. This time, I made sure my subreport sits within its own group band and everything, and it works well as long as I don't have anything added after it on the same page. In other words, if I need another group footer to add something after this subreport, I get the extra page again. If it is the last thing on the page (even if it does not go to the end of the page, all is well). Is there some trick to making multi-column subreports work without getting extra pages? Thanks Betty
  23. Hi -- Thanks! That worked like a charm. I had already fussed with the setItemLabelsVisible(true) to no avail, because I did not know I had to create one of these BaseItemLabelGenerator thingies. Betty
  24. Hi -- Thanks for the reply. On further investigation, I did find the LineAndShapeRenderer calls in the jfreechart API and I thought I solved my problem. But alas, I fussed for hours and no matter what I did, the setSeriesLineVisible() seems to have no effect whatsoever. The setLinesVisible() call does work, but it sets the state for all the lines. I really want this feature. I upgraded to the latest jfreechart 1.0.9 version and everything, and still no luck. I think I have to find the jfreechart forum somewhere and ask about it. Betty
  25. Hi -- <linePlot> has a "isShowLines" attribute. Does anyone know where that ends up under JFreeChart, and is it changeable on a chart series basis? I would like one of my linePlot series to have lines, but the remaining ones not to have lines. Thanks Betty
×
×
  • Create New...