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

rfcmahesh

Members
  • Posts

    7
  • Joined

  • Last visited

  • Days Won

    1

rfcmahesh last won the day on February 28

rfcmahesh had the most liked content!

rfcmahesh's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

1

Reputation

  1. Hi, I am trying to use charts in my report. The detail band lists all the data. I am using JRBeanCollectionDataSource to display the detail band, which works fine. In the summary band, I want to display a chart. I want to pass data to my pie chart as a list of beans as well and map the fields of the bean to the key and value expressions of the pie chart. Below is the code how I dispalying the detail band. Can someone please tell me how to pass list of beans to the pie chart? If possible with examples. Code:Map<String, String> parameters = new HashMap<String, String>();parameters.put("REPORT_TITLE","Sample Report");JRDataSource detailBandDataSource = new JRBeanCollectionDataSource(detailBandBeanList,true);JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, detailBandDataSource );
  2. Figured a way to solve the issue. Make the field which corresponds to enumType as Object and the textField expression as String. It works for me. Code:effectiveType is an enum type in my bean.<field name="effectiveType" class="java.lang.Object"/>The text field expression is<textFieldExpression class="java.lang.String"><![CDATA[""+$F{effectiveType}]]></textFieldExpression>
  3. Thanks C-Box. It was the problem with auto boxing. One more question, I was using that expression to suppress the page header band. I want the page header band to be displayed only when page number is 1 or if the FORMAT_TYPE (custom parameter which I set) is PDF. I have posted a question related to that at http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=52707 Even though I tried doing the printWhen, it still dosen;t work. Do you know any other way? Thanks,
  4. Hello, I am trying to used the follwing expression in one of the printWhenExpressions to supress a band, but I get error. Can some one please tell me the correct way . I want to print the page header only when format type is not HTML or if the page count is 1. The error I get is Sourced file: inline evaluation of: ``new Boolean((((java.lang.Integer)variable_PAGE_COUNT.getValue()) == 1)|| (((java . . . '' : illegal use of null value or 'null' literal ) ) ; Line: 1 Thanks, Code:new Boolean(($V{PAGE_COUNT} == 1)|| ($P{FORMAT_TYPE} != "HTML" && $V{PAGE_COUNT} > 1))
  5. Hello, I am using JRBeanCollectionDataSource as my data source. One of the fields in the bean is an enum type. When I use that property as a field in the report, I get class cast saying Enum cannot be converted to String. I even tried doing $F{enumProperty}.toString(), but it still complains. Can someone please give some pointers. Thanks,
  6. Hello, I have all the column headers in Page header band. When I export it to pdf, the page header repeats on each page, which is correct. When I export the report to html, the page header is still repeating. Can someone please tell me how to stop repeatign page headers when exported to html format. I am using jasper 3. Thanks, The following are the parameters I am settign when exporting to html. Code:exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML,""); exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN,Boolean.FALSE); exporter.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"image?image=");
  7. Hello, When I export a report to HTML, the page header is repeating on each page. For pdf report this is desired behavior. How can I suppress it for HTML export type only. Thanks,
×
×
  • Create New...