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

parthbhagat

Members
  • Posts

    15
  • 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 parthbhagat

  1. For Jasper Report 4.5 How can I access bar chart label expression? I have tried ChartCustomizer, we can access label via SeriesItemLabelGenerator. But when this generator executes, it does not have formula we have set on jrxml file for <labelExpression> field e.g. [barValue$ColorCode$]. I found that <labelExpression> are been executed in CategoryLabelGenerator class, which is JasperReport class. What I want to achieve is I am passing color code from dataset along with bar value with format [barValue$ColorCode$]. I want to pick $ColorCode$ and get that value and then change label value to [barValue]. ColorCode will be used to assign bar color from ChartCustomizer. But thing is when I access labelExpression from StandardCategoryItemLabelGenerator or AbstractCategoryItemLabelGenerator then it does returns [barValue] from generateLabelString()and generateLabel() method. Only intention is to use ColorCode passed from dataset. If we only pass ColorCode instead of [barValue$ColorCode$], then only report shows [barValue] only. I think that we can customize CategoryLabelGenerator class then it would solve my problem. But I don't know how can we customize CategoryLabelGenerator. Any input/help achieving this goal is greatly appreciated. Thank you.
  2. With Jasper Report 6.3.0, I am trying to export report to PDF & CSV format. With PDF format, it exports fine, I am facing an issue with CSV export. Here is the snapshot of my report file. Please note that there are some fields are extended to multiple fields. Now when I export report to CSV, it shows as many commas as the fields are merged form other band. So for in stance in above scenario exported CSV has content like: `12/19/2017 00:00 IST`,`All Segments`,`1`,`1 (100.00 %)`,`0 (0.00 %)`,`0 (0.00 %)`,`0 (0.00 %)`,`0 (0.00 %)``Totals for instance`,,`1`,`1 (100.00 %)`,`0 (0.00 %)`,`0 (0.00 %)`,`0 (0.00 %)`,`0 (0.00 %)``Totals`,,`5`,`5 (100.00 %)`,`0 (0.00 %)`,`0 (0.00 %)`,`4 (80.00 %)`,`0 (0.00 %)``Jan 10, 2018 7:16:40 PM`,,,,`Page 1 of`,` 1`,, I have set field enclosure to (`) Any idea how can we nullify extra commas in CSV export?
  3. Thanks hozawa. Now able to see www.google.com link. But it is not looks like link. It looks like normal text, until we hover mouse on the link. Anyways, thats a different discussion. Have used www.google.com to check that whether hyperlink actually works or not or I am having some config issue. Prime issue with the report is Link Type = ReportExecution. How can I perform drilldown to another report?
  4. I am having Jasper Report API 5.0.1. I have a report having sub report to export data in excel format. When I export report in excel, some overflowed content of cell slightly cuts down and not able to view until we resize row height. Here is the snapshot of how it looks. Here are some options I have tried: net.sf.jasperreports.print.keep.full.text to true Set Stretch Type of all band elements to Relative to Band Height But none of the options worked for me. Can anyone please point out where I might be doing wrong? Here is jrxml file I am trying with: <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="MemberWorkListing_subreport" pageWidth="750" pageHeight="802" whenNoDataType="AllSectionsNoDetail" columnWidth="750" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="50014970-029e-488c-9e4b-b42b8d743e84"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[sELECT * FROM TMP_WK_DTL]]> </queryString> <field name="WK_INT_NO" class="java.math.BigDecimal"/> <field name="WID_NO" class="java.math.BigDecimal"/> <field name="ISWC_NO" class="java.lang.String"/> <field name="TTL_ENG" class="java.lang.String"/> <field name="TTL_LOCAL" class="java.lang.String"/> <field name="DURATION" class="java.sql.Timestamp"/> <field name="WK_LG" class="java.lang.String"/> <field name="WK_CAT" class="java.lang.String"/> <field name="WK_STATUS" class="java.lang.String"/> <field name="ART_NAME_EL" class="java.lang.String"/> <field name="ART_NAME_LE" class="java.lang.String"/> <field name="IP_SET_NO" class="java.math.BigDecimal"/> <field name="IP_INT_NO" class="java.math.BigDecimal"/> <field name="IP_NAMETYPE" class="java.lang.String"/> <field name="IP_WK_ROLE" class="java.lang.String"/> <field name="IP_NAME_ENG" class="java.lang.String"/> <field name="IP_NAME_LOCAL" class="java.lang.String"/> <field name="SOC_NAME" class="java.lang.String"/> <field name="PER_OWN_SHR" class="java.math.BigDecimal"/> <field name="PER_COLL_SHR" class="java.math.BigDecimal"/> <field name="MEC_OWN_SHR" class="java.math.BigDecimal"/> <field name="MEC_COLL_SHR" class="java.math.BigDecimal"/> <field name="SYN_OWN_SHR" class="java.math.BigDecimal"/> <field name="SYN_COLL_SHR" class="java.math.BigDecimal"/> <field name="SEQ" class="java.math.BigDecimal"/> <field name="AGR_NO" class="java.math.BigDecimal"/> <variable name="workCount" class="java.lang.Integer" incrementType="Group" incrementGroup="internalNoGroup"> <variableExpression><![CDATA[$V{workCount} + 1]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <group name="internalNoGroup"> <groupExpression><![CDATA[$F{WK_INT_NO}]]></groupExpression> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="34"> <staticText> <reportElement uuid="6bca70f4-3fc8-42b9-bc88-0b491f747c97" mode="Opaque" x="0" y="0" width="80" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[ INTERNAL NO]]></text> </staticText> <staticText> <reportElement uuid="e20675cf-ac73-4baa-95cd-a4ff4a8365c8" mode="Opaque" x="80" y="0" width="70" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[iSWC NO]]></text> </staticText> <staticText> <reportElement uuid="c23427f6-11da-4b52-a7dd-df63116c8f6f" mode="Opaque" x="150" y="0" width="180" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[TITLE]]></text> </staticText> <staticText> <reportElement uuid="9cd3477c-5763-40fe-9565-0dd412830fc2" mode="Opaque" x="330" y="0" width="80" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[LANGUAGE]]></text> </staticText> <staticText> <reportElement uuid="9863dbce-c990-44b7-b56c-fa8f3bbb0a00" mode="Opaque" x="410" y="0" width="80" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[CATEGORY]]></text> </staticText> <staticText> <reportElement uuid="3baef4d4-aaf6-4024-9ebd-d47bdf348871" mode="Opaque" x="490" y="0" width="80" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[sTATUS]]></text> </staticText> <staticText> <reportElement uuid="72f3706d-885b-4a44-9608-bea5afe6186e" mode="Opaque" x="570" y="0" width="180" height="34" backcolor="#C0C0C0"/> <box> <pen lineWidth="0.75"/> <topPen lineWidth="0.75"/> <leftPen lineWidth="0.75"/> <bottomPen lineWidth="0.75"/> <rightPen lineWidth="0.75"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial Narrow" isBold="true"/> </textElement> <text><![CDATA[ARTISTE]]></text> </staticText> </band> </title> <detail> <band height="15" splitType="Stretch"> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="660806ed-1806-4020-9a0f-c14408440422" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="0" y="0" width="80" height="15"/> <textElement textAlignment="Right" verticalAlignment="Top"> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{WK_INT_NO}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="ad71b230-bfa8-480e-93c1-ccc6e48f57c5" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="80" y="0" width="70" height="15"/> <textElement> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{ISWC_NO}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="eec7d04e-6f4c-4b28-a3fe-8a3433339d14" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="150" y="0" width="180" height="15"/> <textElement> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{TTL_ENG}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="d53915b9-edb6-439d-bec5-fd6231043a37" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="330" y="0" width="80" height="15"/> <textElement> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{WK_LG}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="30e29311-5da3-481f-bb34-d78e4b5b7510" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="410" y="0" width="80" height="15"/> <textElement> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{WK_CAT}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="375efa25-af3b-4699-9a75-56998b52b62e" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="490" y="0" width="80" height="15"/> <textElement> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{WK_STATUS}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement uuid="ee80e636-4a4c-4fbf-90c0-fc61d8c0b894" stretchType="RelativeToBandHeight" isPrintRepeatedValues="false" x="570" y="0" width="180" height="15"/> <textElement> <font fontName="Arial Narrow"/> </textElement> <textFieldExpression><![CDATA[$F{ART_NAME_EL}]]></textFieldExpression> </textField> </band> </detail> </jasperReport>[/code] Jasper Report library export code: JasperCompileManager.compileReportToFile(jrxmlfile, jasperfile); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperfile, reportParameter, dbConnection); JRXlsExporter exporterXLS = new JRXlsExporter(); exporterXLS.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterXLS.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, reportFile); exporterXLS.setParameter(JRExporterParameter.IGNORE_PAGE_MARGINS,Boolean.TRUE); exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE); exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE); exporterXLS.exportReport();[/code]
  5. Hello there, I am having Jasper Report library 4.5.1. Recently we planned to upgrade library to latest version of Jasper Report API i.e. 6.3.0. During migration, I noticed that HTML Hyperlink (which was displayed and worked properly on 4.5.1) is not getting displayed. I am trying to open another jasper report on hyperlink click operation. From Jasper Report Studio, have set parameters: Hyperlink -> Link Target = Self Hyperlink -> Lnk Type = ReportExecution Hyperlink -> Parameters -> _report = "/report/reports/ChildReport.jrxml" (provided that Jasper Studio file structure having all .jrxml files under 'report' directory) When I look at preview of thisreport, I see nothing on text field on which Hyperlink is set. To verify whether it is working or not at all from jasper studio 6.3, have set below parameters: Hyperlink -> Link Target = Self Hyperlink -> Lnk Type = RemoteAnchor Hyperlink -> Hyperlink Anchor Expression = "http://www.google.com/" But still no link on text field. Is there anything I am doing wrong here? Am I missing any configuration part?
  6. Thanks for the reply. I've performed same exercise with Jaspersoft Studio 6.3.0. No change in result, no records in report, but same query have records when run on Oracle developer. I think that should not be matter, because I am using ireport 5.1.0 and running report with jasper report API v 5.0.1. Any idea what could be wrong here?
  7. Hello there, I am using Japser Report API 5.0.1. And running it won compatibility mode on iReport 5.1.0, with SQL data source on Oracle. I am facing a stance issue today. I have a query it works perfectly fine on Oracle Developer Studio, but when I set same query on iReport query editor and check preview data then it does not have any records in preview section. When I check Preview report section, it give blank page (means no records get printed). The query is pretty simple with no parameter. Query: SELECT <select_fields> FROM <table_name> ORDER BY <order_fields> The same query works will and return records on Oracle SQL Developer. Any thoughts what is going wrong?
  8. I am having similar issue. But in my case iReport splash screen does not appear. And observed from task manager that iReport process starts and on other moment it closes. iReport version 5.1.0
  9. JRXML file has character encoding as: <?xml version="1.0" encoding="UTF-8"?> Specified content type of HTML header as UTF-8/ Where else I need to set character encoding? For Japanese character do we require to have Font name specified in FONT_MAP parameter mentioned in the question?
  10. Yes, agree it is encoding issue. But where else I need to specify encoding? The same report works with same data fine when exported in PDF format.
  11. I am using Jasper Report API 4.5. I am trying to export reports in HTML and PDF format. The application I am using Jasper Report in is having i18n support with Japanese language. To export report in PDF format JRPdfExporter class is used. With this exporter generated PDF file works fine. Displays Japanese character properly. But when the same report with same data exported in HTML format the Japanese characters looks like '????'. I am displaying HTML report in web application and exporter class used to export in HTML format is JRHtmlExporter. With HTML exporter I have set paramter JRHtmlExporterParameter.HTML_HEADER as below text: I have set HTML exporter's parameter JRExporterParameter.FONT_MAP as: Map FONT_MAP = new HashMap(); FONT_MAP.put("sansserif", "Arial, Verdana, Tahoma"); FONT_MAP.put("serif", "Times New Roman"); FONT_MAP.put("monospaced", "Courier, Courier New");,>,> Any guess where it is going wrong? Have I missed something in export functionality?
  12. Hi All, I am using Jasper Report to generate report from the Java code. The report designer I am using is iReport. Along with a master report there are several sub reports also available. Now, my question here is, do Jasper Report API has any way to load sub reports dynamically into master report? Here is example: A master report have three sub report. SubReport1, SubReport2 & SubReport3. Now the order of these sub reports displayed in a master report is not specific. It is based on the user inputs. So if user wants to display SubReport2 before SubReport1 then the user have to provide input accordingly. So, is there any way using which we can achieve this functionality using JasperReport API?
  13. Hi all, I am trying to export my report in Excel file with the help of JExcelApiExporter. With that what is happening that, when value of a cell having value is very long in size then it uses cell of next row. In this scenario variable JRXlsAbstractExporterParameter.IS_COLLAPSE_ROW_SPAN is not set to True. If I set this variable to True then it will not merge rows which actually need to happen. I have also tried isStretchWithOverflow="true" for the particular textfield. But not found proper results. I had attached images of the results with & without flag JRXlsAbstractExporterParameter.IS_COLLAPSE_ROW_SPAN flag. Thanking you, Parth Bhagat. Post Edited by parthbhagat at 09/07/2010 04:33
  14. Hi Teodor, Thank you for the reply. I tried this with Jasper Reports, but not found anything for row grouping in Excel. I think this functionality is not implemented with Jasper Reports 3.7.4. But I found an alternate way to do the same. I used POI APIs for row grouping of data in Excel. It provides simple way to group, but very tedious designs of reports in it. Here is the code for that with POI. Please provide me the feedback regarding this. Thanking you, Parth Bhagat. Code:JExcelApiExporter exporterXLS = new JExcelApiExporter();exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);ByteArrayOutputStream output = new ByteArrayOutputStream();exporterXLS.setParameter(JExcelApiExporterParameter.OUTPUT_STREAM, output);exporterXLS.exportReport();bytes = output.toByteArray();HSSFWorkbook xlsFile = new HSSFWorkbook(new ByteArrayInputStream(bytes));HSSFSheet sheet = xlsFile.getSheetAt(0);sheet.groupRow(fromRowIndex, toRowIndex);sheet.setRowGroupCollapsed(fromRowIndex, true);FileOutputStream rowGroupFileOutputStream = new FileOutputStream();xlsFile.write(rowGroupFileOutputStream);
  15. Hi All, I am using jasperreports 3.7.1. In that I am trying to export my data in .xls format using JExcelApiExporter. Export is working fine. What I want is the functionality of Microsoft Excel's grouping of data. As in Excel, by selecting entries to be grouped, go to Data -> Group & select row or column, & then you will see collapse button for that many of rows/columns on left most side. Please find the attached image for more detail. I am trying to do the same in the report. But not done yet. Can any one help me out? Thanking you, Parth Bhagat.
×
×
  • Create New...