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

oamador

Members
  • Posts

    5
  • 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 oamador

  1. I need some help with a crosstab. My data is in rows in database, I need to print a report where the data shows in columns based on the year. The crosstab is set in the summary of the report. The reports shows multiple columns based on the year in the data. The rows are based in two column of the database. One column in the database is used on the first column of the crosstab, the other column is printed on every column based on the year. My first question is that the crosstab will only print the row once. I have duplicates in the column used for the row group in the crosstab. Is it possible to hav the row groups to print one row for every value in that column? So the report could look like Year1 Year2 Year3 Item1 desc desc desc Item1 desc desc desc Item1 desc desc desc Item2 desc desc desc If the table is clear, then item1 is repeated and display multiple times and the description is display on ever year column. The other question is how to set the crosstab to the detail section of the report. I copy the crosstab and the report runs, but it print like 150 pages, instead of the few required by the crosstab. Can one prevent the multiple crosstabs from displaying in the detail section? I'll appreciate any pointer/suggestion about crosstabs.
  2. I have created a report using iReport 2.0.4. One of the elements displays one field from the query. I limited the display of that element using the "Print repeated values" attribute. Is there any way to make additional textfield and lines to not display if the first element is not printed because it is repeating? I looked at the "Print When Expression" attribute and tried to set a value. I was only able to compare against the field. Is there any way to evaluate if a textfield was suppressed because it is repeating? I like to have multiple items items in the report conditional based on the first element. If the first element is suppressed because it is repeating, this other elements will also be suppressed. Any suggestions?
  3. Thanks for the reply. Looking further I found that the column in the view I'm querying, is actually a string and not a date or datetime field, as I assumed. :blush: Since modifying the database is not an option in my case, I opted for writting a function to parse that string into a date and the use a SimpleDateFormat class to format the date. The function is part of a Scriptlet attached to the report. Once again thanks.
  4. This is a 2 part story. First, I'm trying to format a date field in the report. Used the TextField properties to set the pattern to dd-MMM-yy. The field would not use the pattern, so I figured, to change the class of the TextField to Date. Running the report complained that it could not convert from String to Date, so I change the class of the field from String to Date. Ok, now the report format the column using the pattern provided. Q1: Was that the right trail to get iReport to use my pattern for formatting the Date? Second, now that the report is working with the pattern provided, I receiving an error when the date column is null. I have selected to option to print a blank when null in the TextField, but it still issues an exception when running the report. Error filling print... Unable to get value for field 'DATDate' of class 'java.util.Date' net.sf.jasperreports.engine.JRException: Unable to get value for field 'DATDate' of class 'java.util.Date' I noticed that if I change the field class back to a String, it will handle the null value properly and print the blank. But then, I'm back to square one, the pattern is not used for formating the Date. Q2: How to handle null values in a Date class column of a ResultSet? I'm using iReport 2.0, JDK 1.6, MS-SQL JDBC driver 1.1.
  5. Developed one report in a Windows workstation and the report is OK. The report was generated using iReport 1.2.7. With only 35 records in the detail section, it fits in one page. Developed a simple Servlet to run the report and export it to PDF. The PDF is served back to the browser. The servlet works Ok in Windows. The whole report fits in one page. If the same report, now part of a war file, is executed on a Linux server it places extra space below every detail line. The report now takes 2 pages. 2 sample PDF. One was generated from the Windows workstation and the other one from the Linux server. As you can notice, the version generated on the Windows workstation fits in one page. The one generated on Linux has extra space below every detail line. Any idea what is causing the extra space below the detail?
×
×
  • Create New...