Jump to content

jcullison

Members
  • Posts

    25
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by jcullison

  1. I know how to cancelling filling with AsynchronousFillHandle, but is it possible to cancel an export, such as CSV?  Looking at the code I don't see that it could cancel (version 2.0.5).  And I'm not finding anything in the forums, FAQs, etc.

    It would be nice to be able to cancel exports too.

  2. This is probably obvious but I can't see it.  How do it set a text field to truncate at a character boundary instead of a word boundary?  I'm using JR and iReport 2.0.5.  I can't see the setting in the api or the property in the dtd.  That doesn't mean it's not there and I just missed it of course.

  3. I ran into this today. I had a Parameter of type java.util.Date and passed a java.util.Timestamp into it. This parameter was then passed into a parameterized query and was losing the time from the timestamp. The reason it was being lost is because of JrJDBCQueryExecuter way of treating parameters of type java.util.Date:

     

    Code:

    else if ( clazz.equals(java.util.Date.class) )
    {
    if (parameterValue == null)
    {
    statement.setNull(i + 1, Types.DATE);
    }
    else
    {
    statement.setDate( i + 1, new java.sql.Date( ((java.util.Date)parameterValue).getTime() ) ); }
    }

     

    It is converting to java.sql.Date which drops the time part of the java.util.Date per the API http://java.sun.com/javase/6/docs/api/java/sql/Date.html

    To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated.

     

    This is probably the intended behavior for JasperReports, but I thought it would be nice to warn people away from using java.util.Date. Hopefully this will save someone a headache. It was not mentioned in the Ultimate Guide (I have ver 1.3.0).

     

    Regards,

    Jim

    Post edited by: jcullison, at: 2008/02/20 21:05

  4. Ok, I submitted a feature request.

     

    It looks like when compiling with this API you might be able to provide your own implementation of the JavaFileManager. Just a brief look at it, but that looks like it manages the interaction with the ClassLoader.

     

    Thanks for considering it.

    Jim

  5. I understand that you have to consider the number of people who would want any particular feature, that's what I do on a daily basis too. Just wanted to bring it up.

     

    The short version: The Java 6 compiler API adds flexibility for those compiling in various environments, such as applets with custom class loaders.

     

    The long version:

     

    For me, it would likely help my situation, I am currently creating and compiling JasperDesign objects on the fly with the JDT compiler. This works great. The problem is it's in an applet and our framework is supposed to use a custom classloader, which doesn't play nice with JDT. For now the Jasper stuff is running in a separate applet with a plain vanilla classloader.

     

    Trying to deploy the javac compiler didn't work for a number of reasons. Maybe this means the Compiler API wouldn't work either, I don't know.

     

    With the changes coming in Java 6 update "N" it seems like applets will be a bit easier to deal with because of the incremental jar downloads. Hopefully this means the compiler API will be downloadable. If that's true, it might be a nicer situation than where I'm at. Though, by the time it makes it through beta, and JasperReports implements the compiler API (if ever), it will be years away, and we are on a path to be out of applets inside a couple of years.

     

    This is all more than you wanted to know I'm sure, but that's the story.

     

    Thanks for such a great and flexible product! Also thanks for the double line drawing in 2.0.4, I'm going to use that today.

     

    Regards,

    Jim

  6. Resolved.

     

    I'm not sure why it wasn't working before, but I think it has to do with exact placement of things.

     

    At this point I have my fields 11 pixels high, top 0. My subreport is also 11 pixels high, top 11. Detail band height is 22 pixels. Subreport component is set to "remove line when blank" and position type to "float".

     

    Now I can fit many more lines onto a report (~50 with page headers and page footers), thanks!

  7. The float makes sense to me. The problem still remains though. You are talking about components below the subreport in the same band. In my case there are no components below (in the same band). The detail band just stays the same size as I set it originally but I want it to shrink.

     

    So in iReports the setup looks like this:

    Code:

    ~~~Group Header Band~~~~~~~~~~~~~~~~~~~~~~~~
    header header header
    ~~~Detail Band~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ---------- ---------- ----------
    $F{field1} $F{field2} $F{field3}
    ---------- ---------- ----------
    --------------------
    -Detail SubReportComponent-
    --------------------
    ~~~Group Footer Band~~~~~~~~~~~~~~~~~~~~~~~~
    --------------------
    -Group Totals SubReportComponent-
    --------------------

     

    Then the space from the fields down to the bottom of the detail band is kept and output on the report.

     

    So output, even with "float" set still is:

    Code:
    [code]text text text
    <blank line>
    text text text
    ---sub report text
    ---sub report text2
    text text text
    <blank line>
    text text text
    <blank line>
    group totals line1
    group totals line2

     

    Ultimately I want lines from the master records to be as close together as possible (with a few pixels space of course).

  8. I have a master detail report with a subreport in the detail band of the master report. When the subreport has no data I want to get rid of the space the subreport would have taken. Right now, the rows on the master report are basically double spaced when there is no detail.

     

    The data should look like this:

    Code:
    master record 1
    master record 2
    detail record 2a
    detail record 2b
    master record 3
    master record 4
    detail record 4a
    detail record 4b

     

    But instead it looks (incorrectly) like this:

    Code:
    [code]master record 1
    <blank row>
    master record 2
    detail record 2a
    detail record 2b
    master record 3
    <blank row>
    master record 4
    detail record 4a
    detail record 4b

     

    Things I have tried:

    set RemoveLineWhenBlank on the subreport component

    set the no data behavior of the subreport to "no pages"

    shrink subreport component very small

     

    Shrinking the subreport component to 0 seems to work. But it makes the report hard to maintain in iReport, since there is just a black line representing the subreport, and in my case it is at the bottom of the detail band, right on top of a subreport at 0 in the group footer band. I can't visually see it, but I can find it in the Document Structure view.

     

    I don't think this is iReports fault. I think this is a shortcoming of JasperReports. I'm not sure how yet, but I think there should be a way to make this more useable, such as an option on the subreports that subtracts their component height from the band they reside on, but only when they had no records or their printWhenExpression chose to not print.

     

    Make any sense?

     

    Thanks,

    Jim

     

    Post edited by: jcullison, at: 2007/10/10 17:24

    Post edited by: jcullison, at: 2007/10/10 19:12

  9. please ignore this post it is a duplicate

     

    I have a master detail report with a subreport in the detail band of the master report. When the subreport has no data I want to get rid of the space the subreport would have taken. Right now, the rows on the master report are basically double spaced when there is no detail.

     

    The data should look like this:

    master record 1

    master record 2

    detail record 2a

    detail record 2b

    master record 3

    master record 4

    detail record 4a

    detail record 4b

     

    But instead it looks (incorrectly) like this:

    master record 1

    <blank row>

    master record 2

    detail record 2a

    detail record 2b

    master record 3

    <blank row>

    master record 4

    detail record 4a

    detail record 4b

     

    Things I have tried:

    set RemoveLineWhenBlank on the subreport component

    set the no data behavior of the subreport to "no pages"

    shrink subreport component very small

     

    Shrinking the subreport component to 0 seems to work. But it makes the report hard to maintain in iReport, since there is just a black line representing the subreport, and in my case it is at the bottom of the detail band, right on top of a subreport at 0 in the group footer band. I can't visually see it, but I can find it in the Document Structure view.

     

    I don't think this is iReports fault. I think this is a shortcoming of JasperReports. I'm not sure how yet, but I think there should be a way to make this more useable, such as an option on the subreports that subtracts their component height from the band they reside on, but only when they had no records or their printWhenExpression chose to not print.

     

    Make any sense?

     

    Thanks,

    Jim

     

    Post edited by: jcullison, at: 2007/10/10 17:22

    Post edited by: jcullison, at: 2007/10/10 17:23

  10. I do see pretty consistently that switching between zoom levels and moving components around has 1 "unit" rounding errors. But I'm ok with that. For example, a component at 6,9 when moved around at various zoom levels may end up at 6,8.

     

    It may just be a visual problem when placing a new control.

     

    Drawing the box for a new static text.

     

    size=153]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/ireportgrid.PNG

     

    I think the black line should line up with the grid when snap to grid is turned on.

     

    Moving the object after placing it seems to get it in the right spot.

    Post edited by: jcullison, at: 2007/06/18 19:20

×
×
  • Create New...