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

rapthor

Members
  • Posts

    17
  • Joined

  • Last visited

rapthor's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hello, I am passing parameters to a report which works just fine. But when I access the same parameters in a subquery of the report they are just empty. PARAM_1 is the parameter I am accessing in the main report. In my subquery PARAM_1 keeps its default value which is an empty String. I am passing the params via: params.put("PARAM_1", "PERSONS"); params.put("PARAM_2", "CARS"); print = JasperFillManager.fillReport(reportFile, params, conn); Why are these parameters empty in the subquery? Code: <?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="Control Level Security Status Report" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true"> <subDataset name="sub_query1"> <parameter name="PARAM_1" class="java.lang.String"> <defaultValueExpression><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="PARAM_2" class="java.lang.String"> <defaultValueExpression><![CDATA[""]]></defaultValueExpression> </parameter> <queryString> <![CDATA[select * from $P!{PARAM_1}]]> </queryString> <field name="NAME" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> </subDataset> <parameter name="PARAM_1" class="java.lang.String"> <defaultValueExpression><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="PARAM_2" class="java.lang.String"> <defaultValueExpression><![CDATA[""]]></defaultValueExpression> </parameter>.....
  2. Hello, I am using a stacked bar chart which consists of 3 category series (red, green, grey), each having the same value (100), whereas the item label is not displaying the value but another figure that is processed during report rendering. The stacked bar chart looks like this: /uploads/projects/jasperreports/stacked.png Unfortunately I cannot change the font size of the item labels although I am setting the correct (?) property: ... <itemLabel color="#000000" backgroundColor="#FFFFFF"> <font size="5" isBold="false" isItalic="true"/> </itemLabel> ... The item labels in my stacked bar chart keep the same font type (SansSerif 10 plain style) no matter what I change in the XML fragment. Is there any possibility to change the font style of item labels? Thanks in advance. Post Edited by rapthor at 12/15/2009 12:06
  3. Hello, I am exporting a JasperPrint to Excel inside my Java application. The file always contains an empty first column and an empty narrow column after the last data column (like a margin to the left and right of my actual data). How do I remove these blank column automatically? I attached the code that exports my report to Excel. Code: ByteArrayOutputStream baos = new ByteArrayOutputStream(); JRXlsExporter exporterXLS = new JRXlsExporter(); exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, print); exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, baos); exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.FALSE); exporterXLS.setParameter( JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); exporterXLS.setParameter( JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporterXLS.setParameter( JRXlsExporterParameter.IS_IGNORE_GRAPHICS, Boolean.TRUE); exporterXLS.setParameter( JRXlsExporterParameter.IS_IGNORE_CELL_BORDER, Boolean.TRUE); exporterXLS.setParameter( JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE); exporterXLS.setParameter( JRXlsExporterParameter.SHEET_NAMES, sheetNames); exporterXLS.exportReport(); return baos.toByteArray();
  4. Now I think I know what the problem is: The records are not ordered by the values I am using for creating the groups. So whenever a group occures again on a later record, the number of group members is reset and counts up from 0 again. So only the last occurences of each group will be counted. So I know about the problem but I CANNOT order the records because I need all the data for other things already. I am searching for a way to use one result for different group counts.
  5. Hello, in iReport I am inserting a "Bar Chart" that reads records from an XLS file. I have created a group looking like this: <group name="CURRENCY_PAIRS_GROUP"> <groupExpression><![CDATA[($F{CURR_1}.toString()+"-"+$F{CURR_2}.toString())]]></groupExpression> </group> I placed the chart in the summary band in order to get an overview of all different groups each counting their occurences. That is why I used the implicit variable $V{CURRENCY_PAIRS_GROUP_COUNT}. But I get too few counts on each group as there are hundreds of records but the chart only shows about 10 records spread over the different groups. I am quite confused now. Is iReport buggy when it comes to usage of groups in the summary band in a chart? What is the cause for the low number of records? Here is the source of my jrxml-file: <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" href="http://jasperreports.sourceforge.net/jasperreports" href="http://jasperreports.sourceforge.net/jasperreports" href="http://jasperreports.sourceforge.net/jasperreports" class="linkification-ext">http://jasperreports.sourceforge.net/jasperreports" class="linkification-ext">http://jasperreports.sourceforge.net/jasperreports" class="linkification-ext">http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="www.w3.org="" http:="" title="Linkification: <a href=" href="http://www.w3.org/2001/XMLSchema-instance" href="http://www.w3.org/2001/XMLSchema-instance" class="linkification-ext">http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance" href="www.w3.org="" http:="" title="Linkification: <a href=" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance" href="http://www.w3.org/2001/XMLSchema-instance" href="http://www.w3.org/2001/XMLSchema-instance" class="linkification-ext">http://www.w3.org/2001/XMLSchema-instance" class="linkification-ext">http://www.w3.org/2001/XMLSchema-instance" class="linkification-ext">http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports" href="http://jasperreports.sourceforge.net/jasperreports" href="http://jasperreports.sourceforge.net/jasperreports" href="http://jasperreports.sourceforge.net/jasperreports" class="linkification-ext">http://jasperreports.sourceforge.net/jasperreports" class="linkification-ext">http://jasperreports.sourceforge.net/jasperreports" class="linkification-ext">http://jasperreports.sourceforge.net/jasperreportshttp://jasperreports.sourceforge.net/xsd/jasperreport.xsd" href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" class="linkification-ext">http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" class="linkification-ext">http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" class="linkification-ext">http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="dealtypes_amounts" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <field name="DEAL_NO" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWAP_PART" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="BUY_SELL" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="MTRY_DAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWP_RAT_DEAL" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWP_RAT_Z" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWP_RAT_C" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_RAT_Z" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_RAT_C" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWP_RAT_ZS1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWP_RAT_ZS2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_RAT_ZS1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_RAT_ZS2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_SWP_RAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_SWP_RAT2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_DEAL_RAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_DEA_RAT2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUR2_INT_RAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="C1_CUST_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="C2_CUST_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="C1_AMOUNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="C2_AMOUNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="MTRY_ORI_DAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="MTRY_OPT_DAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="MATURED_TAG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="NL_DEAL_NO_C" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="NL_DEAL_DT_C" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="NL_DEAL_NO_Z" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="NL_DEAL_DT_Z" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="OR_ACNT_NO" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="OR_ACNT_INST" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="TR_ACNT_NO" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="TR_ACNT_INST" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LC_CUST_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LC_AMOUNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_DEAL_RAT_LH_1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_DEAL_RAT_LH_2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CLS_STATUS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CLS_CHECKTIME" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORIG_C1_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORIG_C2_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="AVAIL_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="OR_SETTL_NAME" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="TR_SETTL_NAME" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="OR_SETTL_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="TR_SETTL_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_TYPE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SITE_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CAPTURE_USER" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="BRANCH_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_BRANCH" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DIALOG_NO" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_NO" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_CLASS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_CLASS_GRP" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="B_KLASSE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="B_GR_KLASSE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DIALOG_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="REL_PEND_TAG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="REL_REASON" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="FIX_MARG_TYP" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPT_RAT_DEAL" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPT_RAT_Z" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPT_RAT_ZS1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPT_RAT_ZS2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPOT_DEALER" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="FORW_DEALER" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPT_RAT_C" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPT_MARGE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="MARGE_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CENT_DATA_TS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_SUBFCT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CANCEL_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="KIND_OF_DEAL" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPOT_DATE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LONG_SPT_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_STEP" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="COUR_RAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="COUR_AMNT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CAPTURE_TS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_FUNCT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_DATE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="AMNT_ENT_IND" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="VERSION" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SETTLE_IND" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="AUTO_MAT_IND" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="UNIQ_DEAL_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SETTL_REASON" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="MTRY_LIC_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="FORW_LIC_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_ZS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_1_ZS1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_2_ZS1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_1_ZS2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CURR_2_ZS2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="TIMESTAMP" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="USER_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="STATUS_TAG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="BOTEN_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORDER_TS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="BATCH_REF_TS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="EXPIRE_TIMEST" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LIMIT_RATE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPOT_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="STOP_LOSS_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LO_LOCK_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPEC_TRE_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="INT_REMARK" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_REMARK" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="FOREIGN_EXP_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SWP_MARGE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_MARGE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="BEYOND_LIMIT_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="INET_USER_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DUP_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_ORIGIN" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="FOREIGN_IMP_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_SPT_RAT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_SPT_RAT2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEAL_OWNER" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEF_SPT_MARGE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="DEF_SWP_MARGE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORIG_KOD" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LO_TYPE_TAG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SUSPENDED_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LOSS_REPO_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="IMP_FLOW" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="EXP_FLOW" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPL_CURR" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="BUSINESS_TYP" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="RATE_PRV_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="RISK_PRV_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPLH1_CURR_1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPLH1_CURR_2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPLH2_CURR_1" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SPLH2_CURR_2" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SOUCHEN_NO" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="RQST_OOBJ_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="QUOT_OOBJ_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="B2B_DEAL_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="STORNO_FEES" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="STORNO_COSTS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_CLASS_OOID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CUST_CLASS_GRP_OOID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="B_KLASS_OOID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORIG_USER_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORIG_USER_GRP_OOID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ORIG_USER_GRP_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="TZ_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SUPPR_EXP_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="GOOD_FROM_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="GOOD_FROM_TS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="GOOD_FROM_TS_TZ" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="GOOD_FROM_REACHED" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="NOSTRO_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CAPT_RATE_STATUS" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="SKIP_HOME_PP_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ROLL_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="CLOSE_FLG" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LIMIT_TYPE" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LIMIT_LOCK_ID" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LIMIT_EXCEEDED" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LIMIT_RESULT" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <group name="CURRENCY_PAIRS_GROUP"> <groupExpression><![CDATA[($F{CURR_1}.toString()+"-"+$F{CURR_2}.toString())]]></groupExpression> </group> <title> <band height="82" splitType="Stretch"> <textField> <reportElement x="169" y="33" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression> </textField> </band> </title> <pageHeader> <band height="32" splitType="Stretch"/> </pageHeader> <pageFooter> <band height="24" splitType="Stretch"/> </pageFooter> <summary> <band height="178" splitType="Stretch"> <barChart> <chart evaluationTime="Report"> <reportElement x="0" y="0" width="555" height="168"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <categorySeries> <seriesExpression><![CDATA["CPs"]]></seriesExpression> <categoryExpression><![CDATA[($F{CURR_1}.toString()+"-"+$F{CURR_2}.toString())]]></categoryExpression> <valueExpression><![CDATA[$V{CURRENCY_PAIRS_GROUP_COUNT}]]></valueExpression> </categorySeries> </categoryDataset> <barPlot isShowLabels="true" isShowTickLabels="true" isShowTickMarks="true"> <plot> <seriesColor seriesOrder="0" color="#CCCCFF"/> </plot> <itemLabel color="#000000" backgroundColor="#FFFFFF"/> <categoryAxisFormat> <axisFormat> <labelFont/> <tickLabelFont/> </axisFormat> </categoryAxisFormat> <valueAxisFormat> <axisFormat> <labelFont/> <tickLabelFont/> </axisFormat> </valueAxisFormat> </barPlot> </barChart> </band> </summary> </jasperReport> Post Edited by rapthor at 11/23/2009 12:03 Post Edited by rapthor at 11/23/2009 14:27
  6. Hey, thanks for looking at the code. I put the variable in the details band to see its value on each record and I noticed something. Within the expression I am using a field and a variable. (!$F{ATC_NR}.startsWith("(null)")&&$V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>0) ? "" : null Unfortunately, the variable $V{DAYS_TILL_EXPIRATION} I am using has not been processed yet when the expression is first processed. Hence on every next processing of the expression, this variable contains the result of the former (!) step. The data JasperReports processes therefore is inconsistent. So everything is somehow shifted and this is why I see strange results. The field value $F{ATC_NR} is always current, but that's not the case for the variable $V{DAYS_TILL_EXPIRATION} in the same expression :( What I did is replacing the variable in the expression by its definition, which leads to redundancy because I am using the same definition multiple times in the expression and cannot summarize it in a variable anymore. Is there a way to make JasperReports process all variables before actually perform any expression related to these variables? Any other suggestion? I hope it is clear what I wonder about. Thanks.
  7. Hello again, I have created a variable that collects TRUE as suggested by giulio: >1. Create two variables, one to collect trues, the other to collects falses. In fact I created a variable called "$V{ATC_VALID_INT}" with "Calculation = Count" and "Reset Type = Report", "Increment type = None", class "Integer" and the following expression: (!$F{ATC_NR}.startsWith("(null)")&&$V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>0) ? "" : null I am using this variable in my pie chart which is positioned in the summary (!) band. The jrxml at this position looks like: <variable name="ATC_VALID_INT" class="java.lang.Integer" calculation="Count"> <variableExpression><![CDATA[(!$F{ATC_NR}.startsWith("(null)")&&$V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>0) ? "" : null]]></variableExpression> <initialValueExpression><![CDATA[]]></initialValueExpression> </variable> Unfortunately, the variable seems to result in 0. I even checked it in the details band, where for each record the value keeps 0 even though it should count up to a value of 2 (I am using test data which is reduced to 4 records for which 2 records should return true for the above expression). Is there a problem with mixing up fields and variables in my new variable definition? Furthermore I got the feeling that sometimes I get different results for variables between restarts of iReport ... Any help is appreciated .... :( Here is the excerpt of the pie chart: <summary> <band height="526"> <pieChart> <chart isShowLegend="false" evaluationTime="Report"> <reportElement x="14" y="10" width="256" height="175"/> <chartTitle> <font size="12" isBold="true"/> <titleExpression><![CDATA["ATCs valid/expired"]]></titleExpression> </chartTitle> <chartSubtitle/> <chartLegend/> </chart> <pieDataset> <pieSeries> <keyExpression><![CDATA["Valid"]]></keyExpression> <valueExpression><![CDATA[$V{ATC_VALID_INT}]]></valueExpression> <labelExpression><![CDATA["Valid ("+$V{ATC_VALID_INT}+")"]]></labelExpression> </pieSeries> </pieDataset> <piePlot isCircular="true"> <plot> <seriesColor seriesOrder="0" color="#FF3333"/> </plot> <itemLabel color="#000000" backgroundColor="#FFFFFF"/> </piePlot> </pieChart> </band> </summary>Post Edited by rapthor at 11/16/2009 14:05 Post Edited by rapthor at 11/16/2009 14:08
  8. Hi Christina, thanks for the quick reply BUT as mentioned, the key expression of the pie chart exactly matches the group expression the variable ${ATC_VALID_GROUP_COUNT} belongs to: PIE CHART KEY EXPRESSION ===>>> $V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>-11 ATC_VALID_GROUP ===>>> $V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>-11 ATC_VALID_GROUP_COUNT ===>>> [the number of elements in the groups that are built on my boolean expression?] So, why is $V{ATC_VALID_GROUP_COUNT} giving me 1 and 79 although I am absolutely sure it should be about 210 and 830 for my test data? The test data has about 1040 results. Shouldnt 1 and 79 be equal to the result of occurences of TRUE and FALSE of my pie chart key expression? I really appreciate any response that helps me a bit :)) Thanks.
  9. Hello, I am trying to fill a pie chart with data that is based on group processing. I attached a picture of my wrong pie chart to this thread. The pie chart is placed in the summary band next to other charts containing group usage. The Detals tab of the pie chart looks as follows: Key expression: $V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>1 Value expression: $V{ATC_VALID_GROUP_COUNT} Label expression: $V{ATC_VALID_GROUP_COUNT} As you can see I am using a boolean expression for the key. So there should be 2 slices representing true and false. Furthermore, the value itself should be the number of true and false results by the same expression, which is again defined in the group called ATC_VALID_GROUP. ATC_VALID_GROUP contains the same expression used for the key above: $V{DAYS_TILL_EXPIRATION}!=null&&$V{DAYS_TILL_EXPIRATION}.longValue()>1 From what I understood, the implicit variable $V{ATC_VALID_GROUP_COUNT} should contain the number of occurences of the group true or false. The resulting pie chart looks strange: It has 2 slices BUT they are labelled 1 and 79 and their values seem to be the same. The dataset I am working on contains hundreds of records and therefore hundreds of $V{DAYS_TILL_EXPIRATION}, so I would expect something like 280 true and 800 false. I am SURE the variable $V{DAYS_TILL_EXPIRATION} is based on a record field and contains java.util.Long numbers. What is wrong with the way I am processing the records? Post Edited by rapthor at 11/13/2009 09:36 Post Edited by rapthor at 11/13/2009 09:49
  10. Hi, no that does not really help because the main dataset already takes quite long to be processed. Another database call just for the sub dataset would take similarily long. Is there a possibility to work on the same data set and still create this pie chart by processing the resulting records?
  11. Hello community, I experimented with groups and representing them in a pie chart running into a problem: I added a group named "AGED_ABOVE_18" defined by a boolean expression like $F{AGE}>18. I was adding a pie chart that should display 2 slices, containing the number of group elements of each group (there will be only 2 groups depending on whether the group expression is true or false). In the end I want the pie chart to show me a slice of people aged > 18 and a slice showing people aged <= 18. Now I am getting confused what I would have to insert into the 3 editors in the Details tab of the pie chart. Key expression (???) Value expression (The number of records matching either true or false. - $V{AGED_ABOVE_18_COUNT} ???) Label expression (The number of records matching either true or false. - $V{AGED_ABOVE_18_COUNT} ???) Furthermore which Reset Type (Group - AGED_ABOVE_18 ???) and Increment Type (None ???) is correct? Thank you in advance! Post Edited by rapthor at 11/12/2009 12:59
  12. Thank you for the advice! I have created a class that handles more complex stuff and that way extract it from iReports.
  13. Hello, I wonder how it is possible to work with a Java-Object in iReport that I can use for variable assignments later. For example, I am initializing a GregorianCalendar-Object by using its setTime() method: GregorianCalendar gc = new GregorianCalendar(); gc.setTime(${DATE}); I want to store this object instance somewhere in my report (like a code snippet that is executed once). I want to use the stored object instance to use the following expression as assignment for a new variable: gc.getTimeInMillis() How/where is it possible to store several lines of code that can be re-used in the report using iReport? Thanks in advance!
  14. I have it fixed. I do not know what the reason was, but I just removed and placed a new variable again. Seems as if some data was corrupt inside the report.
  15. Hello, I got a null when I try to divide a Long variable by a number, round it and assign it to another Long variable: New Long(Math.round(new Double($V{DATE_IN_MILLISECONDS}.longValue() / (60*60*1000*24)))) The result variable is also of type Long but when I compile and preview my report, I only see null. The referenced variable $V{DATE_IN_MILLISECONDS} is valid, as I see its value at preview. Why is the expression null ? Thanks in advance! Post Edited by rapthor at 11/07/2009 15:12
×
×
  • Create New...