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

2005 IR Help

Members
  • Posts

    2,830
  • 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

Posts posted by 2005 IR Help

  1. By: Celamus - celamus

    PDF Export fails on OS X??

    2005-12-14 14:24

    Hi -

     

    I have written a report using iReport 0.5.2 on OS X 10.4.3. The detail band includes a couple of fields, and a 3D Bar Chart.

     

    When I compile and run the report in iReport, with the Build menu set to 'JR Viewer Preview', everything builds, runs and displays correctly.

     

    However, if I choose PDF Preview, the report compiles and generates without problem, but then hangs forever at the 'export' step. If I then open the output PDF file, I have everything up to the first chart in the file.

     

    If I remove the chart object from the report definition, the pdf exports and displays without a problem (but without a chart, either, of course!). If I place a 'default' chart in the file, with minimal binding and no data series defined, it hangs again - so it's not specific to the data I'm trying to display.

     

    I get the same broken behaviour if I open and run the .jrxml file using 0.5.1 on the Mac.

     

    However, using 0.5.1 on a WinXP machine, the PDF generates just fine with the chart in place.

     

    Is this a known issue? How can I work around it and/or help troubleshoot the problem?

     

    Thanks!

     

     

     

     

    By: Celamus - celamus

    RE: PDF Export fails on OS X??

    2006-01-05 13:52

    [Cross-posting from the Jasper forums.....]

     

    In case anyone is interested, the underlying issue seems to be a bug in the iText library, which doesn't play nicely with Apple's JVM, as discussed here:

     

    http://article.gmane.org/gmane.comp.java.lib.itext.general/19734

     

    The latest CVS version of iText still seems to have the problem, but by making the edit to the iText source, as discussed in that posting, recompiling it, and putting the jar where (in my case) iReport can find it, the problem does indeed seem to have gone away.

     

    Thanks to Richard and Chris over on the iText list for tracking it down and working out how to fix it!!

  2. By: mehercharan - meher_charan

    Excel Report not generating properly

    2005-12-21 05:47

     

    Hi All,

     

    I am using ireports 0.3.0.

    I am generating my Report in Excel format.

    While generating the Report in Excel format Grids are not getting displayed,plain text is displayed.

    Is this a problem with ireports 0.3.0?

    Please help me.

     

    My code looks like this:

     

    JRXlsExporter jRXlsExporter = new JRXlsExporter();

    ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();

    jRXlsExporter.setParameter(JRExporterParameter.JASPER_PRINT, report);

    jRXlsExporter.setParameter(JRExporterParameter.OUTPUT_STREAM,xlsReport);

    jRXlsExporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);

    jRXlsExporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.TRUE);

    jRXlsExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,ReportsConstants.bankDetailsHtml);

     

    //jRXlsExporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);

     

     

    jRXlsExporter.exportReport();

    bytes = xlsReport.toByteArray();

     

     

     

    // response.setContentType("application/vnd.ms-excel");

    // response.setHeader("Content-Disposition","filename=");

    response.setContentType("application/vnd.ms-excel");

    response.setContentLength(bytes.length);

    xlsReport.close();

    OutputStream ouputStream = response.getOutputStream();

    ouputStream.write(bytes, 0, bytes.length);

    ouputStream.flush();

    ouputStream.close();

     

     

    Regards,

    Meher

     

     

     

     

     

     

     

     

     

    By: mehercharan - meher_charan

    RE: Excel Report not generating properly

    2006-01-02 06:00

     

    Hi All,

    Can some one tell how grids can be displayed in ireports 0.3.0. Is it possible with this version or we need to look for an alternative solution.

     

    pls respond to the post.

  3. By: Richard HALLIER - rhallier

    Newbie question

    2005-12-29 07:55

    Hi all,

    I'm using IReport 0.5.2 against JasperReports1.1.1.

    My use case is very easy to understand, I have to display only one entity bean, not a list just one instance. It's not a problem, but I need to expose so many attributes that I have to write them on 2 pages (A4).

    And IReport blocks me when I attempt to increase the size of my detail band, actually more than one A4 page.

    I realize my question is pretty trivial but can someone help me please ?

    R.

     

     

     

     

    By: -JE- - julegner

    RE: Newbie question

    2005-12-30 01:29

    you can use small textfields with "stretch with overflow"=true

     

     

     

     

    By: gilbertoca - gilbertoca

    RE: Newbie question

    2005-12-30 05:16

    You can edit the xml version!

     

    Edit-->Edit XML Source

     

    After that you will see a text editor(if you had set it) with xml source. Look for detail band size attribute and resize it.

     

    hth,

     

    Gilberto

     

     

     

     

    By: Richard HALLIER - rhallier

    RE: Newbie question

    2005-12-30 12:38

    The tip works with iReport !

    But it doesn't pass the compilation !

    The following error occurs :

    The detail section, the page and column headers and footers and the margins do not fit the page height.

     

    Oh my god, is there any workaround ?

    Thank you for your support.

    R

  4. By: hillary - wikkitt

    Subreport Return value

    2005-11-28 07:34

    Hi all,

     

    I still can't get my subreports to return a value to the master report. I keep getting null values.

     

    Is there something special I have to put in the master variable expression to recieve the subreport value? Also, it throws errors when I try to use a custom subreport variable instead of using one of the built in variables.

     

    Any help would would be great!

     

    Thanks

     

     

     

     

     

     

    By: -JE- - julegner

    RE: Subreport Return value

    2005-12-30 04:19

    try set the evalution time to band or group.

  5. By: tolga gucuk - e111982

    Timestamp and String comparison in ireport

    2005-12-30 00:18

    hi.

    i couldnt solve the problem below.I have a Timestamp variable $F{period} and when i print it it gives 01.01.2005 00:00 . However the statement below always return false.

     

    ($F{period}.equals("01.01.2005 00:00")) ? a:b

     

    thanks for help.

  6. By: Motoko2501 - motoko2501

    How to get a '0' when i get a null

    2005-12-15 23:45

    i have tried several things like,

     

    $F{field} == null ? new Double(0) : $F{filed}

     

    It does not function i have tried other things like, $F{field}equals(null)[]$F{field}compareTo(null)[]$F{field}compareTo(new Double(null)) and nothing works. Does someone have a solution to this?

     

     

     

     

    By: pubDispName - mellino

    RE: How to get a '0' when i get a null

    2005-12-15 23:53

    Are you sure that you have null value in F{field}? If it is a String you can have "".

     

    Anyway, why don't you substitute the value directly in query?

    bye.

     

     

     

     

    By: Motoko2501 - motoko2501

    RE: How to get a '0' when i get a null

    2005-12-16 00:44

    well i think i have null because the report fills with 'null' when i gent nothing from the query.

     

    The query is as follows.

     

    select alta, t5.cod_member, t5.cod_wer_file_sq, t5.total_load from

     

    (select cod_wer_file_sq cod_alta, count(cod_type) alta

    from t_wer_file_stat

    where cod_type in (1,2) and stat_type=2

    group by cod_wer_file_sq) t0,

    (select cod_wer_file_sq cod_modificada, count(cod_type) modificada

    from t_wer_file_stat

    where cod_type in (3,4) and stat_type=2

    group by cod_wer_file_sq) t1,

     

    (select cod_member, cod_wer_file_sq, total_load

    from t_wer_file

    where cod_member = $P{socio}

    and dat_feedback_gen > $P{fecha_inicio}

    and dat_feedback_gen < $P{fecha_fin}

    order by cod_wer_file_sq) t5

    where t5.cod_wer_file_sq = cod_alta (+)

     

    How should i substitute the eventual 'null'/nothing values i can get in the alta field in the query?

     

    PD: it's a Double Field.

     

     

     

     

    By: Motoko2501 - motoko2501

    I found out how to do it

    2005-12-16 05:35

    Well after revising some SQL manuals i found out that there is a sql function named NVL that solves the problem.

     

    NVL(data,valuewhennull) Select NVL(alta,0) [..]

     

    This fills with a 0 the field alta if it contains a 'null/nothing'.

     

     

     

     

    By: -JE- - julegner

    RE: How to get a '0' when i get a null

    2005-12-23 03:26

    I also need a Solution for this problem, but unfortunately I do not understand your solution.

     

    I have a SQL-Query like:

     

    SELECT distinct sum(task_log_hours) as Hours

    from ...

     

    and i have to have "0"-Values instead of null-values.

     

     

     

     

    By: Lemon - lemon008

    RE: How to get a '0' when i get a null

    2005-12-29 00:32

    I need 0 value instead null. Null makes me plot the graph completely wrong.

    e.g. I get 5 in Oct,0 in Nov and 7 in Dec. The graph

    is just simply draw a straight line from 5 to 7. That make the value of Nov be 6.

    How can i solve this problem? Thanks.

     

     

     

     

    By: -JE- - julegner

    RE: How to get a '0' when i get a null

    2005-12-29 03:58

    I got a Solution for my problem:

     

    if you use mySQL, NVL does not work, use IFNULL instead.

     

    so it is:

     

    SELECT ifnull(sum(task_log_hours),0) as Hours

    from ...

  7. By: tolga gucuk - e111982

    adding two doubles in group header subreport

    2005-12-29 03:02

    hi

    I have a subreport and a mainreport. Mainreport has a group . i have two double variables in mainreport. one from groupfooter the other from subreport. when i display these two it is ok. however when i added it always gives null. i tried all the possibilities in evaluation time.

    is there a solution to that? please i have realy in need..thanks.tolga

  8. By: kala - kalakala

    Two textfields, one stretched, the other no.

    2005-12-28 09:01

    Hi!

    I have two textfields, one (DESCRIPTION) is stretched with overflow, the other (AMOUNT) no. How can I make to put both align to top when I have several lines in detail like this:

     

    DESCRIPTION AMOUNT

    The first description has 'n' 3.00

    lines

    The second description has 'm' 4.00

    lines

    The third description has 'p' 5.00

    lines

    ....

     

    I can't get AMOUNT "4.00" is aligned to top with DESCRIPTION "The second description..." when DESCRIPTION "The first description..." has more than one line.

     

    Thanks a lot!

    Kala

  9. By: alexndvy - alexndvy

    HELP URGENT : Export2Excel

    2005-05-09 10:03

    Hi all,

     

    is there some documentation about how to design templates to export to excel? I used a jrxml to generate a report to html and it looks good. But when I used the same one for excel, the final spreadsheet have hidden columns and did not include a jpg image. Any idea about why this is happening? I am using it inside a servlet and using an OutputStream to generate the excel spreadsheet inside IE browser.

     

     

    thanks in advance

     

    Alexandre

     

     

     

     

     

    By: karthik163 - karth163

    HELP URGENT : Export2Excel

    2005-12-26 23:37

    hi alexndvy,

     

    i have the problem of not knowing how to export the report to excel. can u help me in getting the excel report, either the code or some guidelines. it wud be of great help, kindly help me

     

    thanks in advance,

     

    karthik

  10. By: subesingh - subesingh1

    Draw Rectangle in Whole Band

    2005-12-26 23:20

    Hi,

     

    I have added a sup report in main report and draw a rectangle around it.

    Stretch type is set to Relative to tallest object.Rectangle is stretch according to the contents that are comming from subreport.

     

    But I have required to draw the rectangle in whole detail band.

     

    Any idea how to do it?.

    Thanks in advance for help.

     

    With Best Regards,

    Sube Singh

  11. By: subesingh - subesingh1

    Sub Report contents printed multiple times

    2005-12-26 22:33

    Hi,

     

    I have called a sup report in main report in detail band.After pasting the sub report tool in

    detail band,I have drown a rectangle around the

    it.

    When subreport is called its contents are printed two times in detail band.

     

    First I guess it is due to Parameter "isPrintRepeatedValues=true"

    But I have setted it false.It gave the same result and subreport output printed two times with rectangle which is draw around the sub report.

     

    Functionality of isPrintRepeatedValues is :

    -------------------------------------------

     

    This flag allows suppressing the repeating values for the dynamic elements such as text fields and image fields and to fully customize the behavior of the static elements like rectangles, lines, ellipses and static texts.

    true

    Dynamic elements will print even if their values repeat. Static elements will appear every time the band that contains them is started.

    false

    Suppresses the repeated values for the dynamic elements. The static elements will print only according to the other 3 attributes: isPrintInFirstWholeBand, isPrintWhenDetailOverflows, printWhenGroupChanges.

    DEFAULT true

     

    Plz help, it is urgent.

     

    Thanks in adavance for help.

     

    With Best Regards,

    Sube Singh

  12. By: woodchuck - woodchuck5

    how to generate dynamic columns based on data

    2005-12-20 08:29

    hihi all,

     

    does anyone know how to design a report to generate a table with dynamic columns? (ie. based on the datasource?)

     

    so sometimes the table could have 4 columns and sometimes 10 columns depending on the data.

     

    is this possible to do?

     

    please and thanks in advance!

    woodchuck

     

     

     

     

     

    By: Pavel A. Zvyagin - pzvyagin

    RE: how to generate dynamic columns based on data

    2005-12-20 19:56

    ain't it what people call "crosstabs"?... as far as i know, JasperReports supports them, but iReport doesn't. Signor Toffoli, quando potremo creare dei crosstabs con iReport?

     

     

     

     

    By: woodchuck - woodchuck5

    RE: how to generate dynamic columns based on

    2005-12-21 11:18

    hi, i didn't know what it was called but, yes, crosstabs seems to be exactly what i want.

     

    i ran the demos from the latest jasperreports distribution and, wow, very impressive!! generates great looking tables based on data.

     

    however, my next obvious hurdle is to understand how to make my own crosstab reports. but i can't seem to find any documentation or tutorials anywhere at all.

     

    i looked at the .jrxml files but learning from these files is very hard. (does anyone really hand code these .jrxml files completely??)

     

    can anyone point me to any free resources on learning about crosstabs? (or is the only way to buy the jasperreports manual?)

     

    please and thanks in advance!

    woodchuck

     

     

     

     

     

    By: Laurent Coustet - laurentcoustet

    RE: how to generate dynamic columns based on

    2005-12-22 01:36

    Yes I've made some crosstabs from scratch with the jasperReports documentation and examples... It's not as hard as you can think, just try making it with you're hands, ...

     

    I've spent about half a day understanding how it works, but now, it works perfectly...

     

    The JasperReports manual is not too expensive... You should consider buying it to help JasperReports Developpement !!

     

     

     

     

    By: woodchuck - woodchuck5

    RE: how to generate dynamic columns based on

    2005-12-22 06:51

    hi Laurent!

     

    thx for your reply!

     

    ok, i will try to create a crosstab report by hand. i did spend some more time reading the demo crosstab .jrxml files so i will definitely give it a try!

     

    and you're right, i may just end up buying the manual anyhow!

     

    thanks!!

    woodchuck

  13. By: propsystem - propsystem

    How to define numbering (1,2,3)by group

    2005-12-12 02:50

    i got problem to declare numbering 1..2..3. in group area using count function in variable.exp:

     

    1. Ahmad 01122

    2003 - RM 200

    2004 - RM 100

     

    2. Aishah 02333

    2003 - RM 150

    2004 - RM 100

     

    3. Ali 06555

    2003 - RM 150

    2004 - RM 100

     

    where name in group area not in detail area

     

     

     

     

     

     

     

    By: antobuccia - antobuccia

    RE: How to define numbering (1,2,3)by group

    2005-12-14 06:23

    Use variable COLUMN_NUMBER

     

     

     

     

    By: propsystem - propsystem

    RE: How to define numbering (1,2,3)by group

    2005-12-22 00:25

    column number only working for detail section

     

     

     

     

    By: Uli - ukrebs

    RE: How to define numbering (1,2,3)by group

    2005-12-22 00:54

    looks like i have a similar problem; i started to define a new variable, but no success so far.

    See new threat, if you think we working at the same type of problem

     

    Uli

     

     

     

     

    By: Uli - ukrebs

    RE: How to define numbering (1,2,3)by group

    2005-12-22 02:03

    If i got your problem rigth:

    define a variable (integer) (for example groupnum)

    set groupnum initial value to 0

    set expression to V{groupnum}

    set calculation type count

    set reset type group and goup as your band is named

    try to find an increment typ, which gives you the needed behavior

    good luck!

    Uli

  14. By: Uli - ukrebs

    iReport 0.5.2 -> add field does not work ???

    2005-12-21 23:12

    Hello out there,

     

    when trying to add a field into the object library, it accepts the input without any error message but the field is not there afterwards; this feature is working in iReport 0.5.1.

     

    What do i do wrong?

     

    Thank's for help.

     

    Uli

  15. By: Sven van Bevern - sbevern

    Carry over depending on column count

    2005-12-21 06:11

    I have an report with some data in detail band.

    A variable calculates the sum of the values

    I d like to print "carry over" at the first Page (or on even more pages) and "total sum" at last page. I hav seen that there is a Variable COLUMN_COUNT but a textfieldExpression must contain this variable with two evalutation times.

     

    How could I do this ?

     

    Example:

    page 1

     

    Value: 10

    Value: 22

    Value: 8

     

    Carry Over : 40 (variable)

     

     

     

    page 2

     

    Value: 8

    Value: 12

     

    total sum : 60 (variable)

     

    Thanks for your help !!!

  16. By: eric - greatmaster

    Problem starting ireport0.5.2 on Win98

    2005-12-21 04:47

    Hi,

     

    i installed ireport0.5.2 on win98 and i have the following error :

     

    commutateur non valide - /D

     

    What's the problem?

     

    I saw a /d in startup.bat located in ireport-0.5.2/bin. What is /d about ?

     

    Eric

  17. By: Stefano Gallina - warx_sg

    How to round a BigDecimal variable ?

    2005-12-15 08:02

    Hi all,

     

    I defined a variable called TOTAL.

    I add some BigDecimal values in it and i defined a pattern to display it.

    The numeric pattern displaies only two decimal values; i noticed that the value of the variable is automatically rounded.

    For examples:

     

    10.66 + 2.33 = 13.00

     

    The result should be 10.99

    Is there a way to define a round mode for the variable or to have the right result?

    Cheers.

     

    Stefano

     

     

     

     

     

     

     

     

     

     

     

     

    By: Chris Germano - netslayer

    RE: How to round a BigDecimal variable ?

    2005-12-15 15:27

    prob a bad idea, but should work. multiply all numbers by 100, then add them and divide by 100.

     

    ie

    10.66 * 100 = 1066

    2.33 * 100 = 233

    1066 + 233 = 1299 / 100 = 12.99

     

     

     

     

    By: Sven van Bevern - sbevern

    RE: How to round a BigDecimal variable ?

    2005-12-21 02:52

    to round your variable you could also use Method public BigDecimal setScale(int scale, int roundingMode) of BigDecimal Object

     

    In your case setScale(2,BigDecimal. ROUND_HALF_UP) is very useful!

  18. By: chandan - chandan_000

    Subreports dont show up

    2005-12-21 02:08

    Hi,

     

    Using iReport-0.5.2, I created two reports, named - MasterReport.jrxml & SlaveReport.jrxml.

     

    SlaveReport.jrxml contains only a Static Text element inside the detail section, and all other bands are made invisible (i.e. Band Height set to 0). Running this report individually is successful.

     

    Then I inserted SlaveReport into the detail band of the MasterReport, the size of the SlaveReport being appropriately set to be accomodated inside the master. I set only the subreport expression to the location of the compiled SlaveReport.jasper, keeping the syntax as instructed.

     

    Running the MasterReport doesn't show the contents of the SlaveReport(in any viewer).

     

    Plz help me. Am I missing out anything while doing it?

  19. By: map - map3170013

    Date on Axis Chart

    2005-12-05 10:21

    Hello,

     

    I've a problem in a chart built on iReport. This chart just displays quantities in a axis and dates related to these in another axi. But, the date information isn't been displayed correctly. The data comes from a query (database is Oracle).

     

    The field is on Time Series, like that:

     

    $F{dateValue}

     

    For example:

    Query result:

    Quantity: 10000

    Date Value: 2005-05-12

     

    On the chart, the quantity is displayed OK, but the date information is displayd like "00:00:00.000"

     

    I've tried to format it, but no success, like that:

     

    1. I've created a variable called "parse" and in it expression I've inputed:

    new java.text.SimpleDateFormat("dd/MM/yyyy")

     

    2. In time series, I've tried to format like that:

     

    $V{parser}.format($F{dateValue}) (wrong)

    $V{parser}.format($F{dateValue}.toString()) (wrong too)

    new Date($V{parser}.format($F{dateValue}())) (wrong too)

     

    Please, I'm not getting to solve this issue and I would appreciate any help.

    Thanks a lot!

    Regards,

    Marcelo

     

     

     

     

     

     

     

     

    By: kevinl - kevinl70

    RE: Date on Axis Chart

    2005-12-12 13:10

    Marcelo,

    If you are using an Oracle query to pull back data, use the TO_CHAR(date,'MM/dd/yy') function. Here you can specify the way the date is shown to the viewer. Here is a good link for that: http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/functions134a.htm#1009326.

     

    As we are on the subject, has anyone figured out on to format rotation for the X-axis labels? I need to show dates, but as my reports could be showing up to years of data in a bar chart, all of the lables are mutated together. Thanks.

     

     

     

     

    By: map - map3170013

    RE: Date on Axis Chart

    2005-12-13 06:58

    Hi Kevin,

     

    Thanks for your help. I've got to solve my problem and your information was very appreciated.

     

    Regarding your problem, unfortunately I didn't understand it. Please, can you give me more information? Maybe I can help you to solve this problem.

     

    Thanks

    Regards!

    Marcelo

     

     

     

     

    By: kevinl - kevinl70

    RE: Date on Axis Chart

    2005-12-15 11:42

    Marcelo,

    Sorry about the vagueness of my issue. But the problem I am encountering is the orientation of the X-axis labels. Currently the labels are in horizontal alignment. But I need to show the lables in a vertical alignment. As my users could be pulling data from a 1 month period up to an 18 month period. I know there is a Rotation choice for a textfield and static field, but have not seen anything for the graph labels. With my luck, there is probably something simple that I am overlooking.

     

    Thanks.

    Kevin

     

     

     

     

    By: map - map3170013

    RE: Date on Axis Chart

    2005-12-19 09:54

    Kevin,

    Thanks for your answer. I'm sorry by late because I was out of office. I understood your problem. I've checked my library and I asked my coworkers this issue, but they really don't know how to perform this rotation of the label too. But, I will keep trying how to perform the rotation. If I have some news, I'm going to get in contact with you.

    Keep trying you too... good luck!

    Thks and regards,

    Marcelo

     

     

     

     

    By: kevinl - kevinl70

    RE: Date on Axis Chart

    2005-12-20 08:30

    Marcelo,

    Thanks for your reply. I will also keep checking and looing for an answer, and if I find one, I will post the solution on here.

     

    Kevin

  20. By: tadzius - tadzius

    page break

    2005-12-15 00:47

    hi,

     

    I have report that contains pageHeader, detail, pageFooter and summary. There is a subreport in detail and it contains columnHeader, detail and lastPageFooter.

    And this is what i need to do: if at least one line of report's summary moves to next page i need last line of subreport's detail, subreport's lastPageFooter and report's summary move to the next page.

    any suggestions?

     

     

     

     

    By: Chris Germano - netslayer

    RE: page break

    2005-12-15 15:54

    i usually move pageheader and pagefooter bands into the subreport for this reason. so that they get repeated for each page of data.

     

     

     

     

    By: tadzius - tadzius

    RE: page break

    2005-12-16 04:56

    that's the screenshot of the first page of my report:

    http://proin.ktu.lt/~s65973/optimizavimas/page1.JPG

     

    and that's the screenshot of the second page of my report:

    http://proin.ktu.lt/~s65973/optimizavimas/page2.JPG

     

    so as you can see the summary moves to the second page. and i want the last line of my subreport's detail and both lines of lastPageFooter to move to the second page aswell. is my problem clear now?

     

     

     

     

    By: tadzius - tadzius

    RE: page break

    2005-12-19 06:51

    seems nobody will help me here...

×
×
  • Create New...