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

anupp1983

Members
  • Posts

    49
  • 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

Everything posted by anupp1983

  1. Hi, I am using jasper report3.6.My requirement is how to generate drill down reports IN IREPORT. can u send me give example. Thanks in advance Anup
  2. Hi, I am using jasper report3.6.I have 4 subreport(Query based) in a master jrxml.In master Jrxml Select * from dual.My problem is In master Jrxml,Page footer UserName is not comming .Actually I am Taking login Name from session .But when report is generated then i m getting Exception Column Name is not there.. Thanks in Advance Anup
  3. Hi, I am using jasper report3.6.I want to use dynamic date pattern in a jrxml.As per my requirement I have one jrxml and filed is Date and i have selected pattern which type of format u want to select this one.Its working fine. I have two client.One client is dd/mm/yyyy another client requiement is mm/dd/yyyy.but i ahve one jrxml.can i use Installation parameter in jrxml instead of Date Pattern .is it possible for pattern as a parameter in JRXMl. Plz help me . Thank in Advance... Anup
  4. Hi, I m using jasper report 3.6 .I have 4 subreport and Different-2 Query in each sub report.I am passing query String in JRXML. My problem is in Query String 3 subreport two parameter and 1 subreport only one parameter is passing.So problem is i m not getting result in 1 paramter report.there is no showing report one paramter passing.. Thanks in Advance Anup
  5. HI, I am using jasper report3.6.and i m using query in jrxml.I m not using percenatge in built feature of Ireport. I have taken seperate variable suppose i have two column. say employeeName another column is salary. i have taken two variable totAmount and salaryPercentage. So how to calculate salary percentage.I did but salary percentage result is not correct.As per example .SalaryPercentage=($F{Salary}/$V{totAmount}*100 and in properties i have selected Auto also. So how to rectify this prob. can anybody help me.. Thanks in advance Anup
  6. Hi, I am using jasper report3.6.I want to use hyperlink in pdf report and i m using Query String in JRXML.So if PDF is generated and i want to put hyperlink one column data in pdf.after clicking Hyperlink then another Query(JRXML) report should be generated. So please help me .how can i resolve this issue... Plz help me.. Thanks in advance... Anup
  7. Hi, I m using jasper report3.6.In Database Query some amount data is 0(ZERO).In report i dont want to show ZERO data in PDF report i.e (ZERO should be replace Blank). So how to write EL Expression in IReport(JRXML). as per example $F{XBT_BNK_SETL_DTL_BSDT_AMT_FC} !=0 ? $F{XBT_BNK_SETL_DTL_BSDT_AMT_FC} :(CODE) Please help me.. Thanks in advance Anup Post Edited by anupp1983 at 01/22/2011 10:19
  8. Hi, I am using jasper report 3.6.and My problem is In PDF report, I want to repeat Column header page wise so i have checked ReprintHeader in IREPORT so its working fine .but in Excel Report i dont want to repeat Column header . So plz help me. Thanks in Advance Anup Post Edited by anupp1983 at 01/22/2011 08:58
  9. Hi, I am using jasper report3.6.I want to generate Excel Report in jasper .and my data is 500.so problem is In excel report 30 record after that new column header&page number is coming.So i want to generate no break up in Excel report.So plz help me where i m missing .I m waiting for ur response. I m sending jrxml and java code also. Thanks in advance Anup Code: Post Edited by anupp1983 at 01/14/2011 06:29
  10. Hi, I am using jasper report3.6.I am facing problem in 3Dchart. I want to show Salary percentage(%) in 3Dchart report.I am using Query based report and i m sending JRXml also.Plz check it where i m missing in jrxml.Plz give me a solution. I m waiting for ur response.. Thanks&Regards Anup Code: Post Edited by anupp1983 at 01/11/2011 10:34
  11. Hi, I am using jasper report3.6.I have two column i.e TxnType and Amount.TxnTpe Column say withdraw and deposit .Actually I want to calculate TotalAmount.Say In Run time decide how many fields are withdraw and deposit According to Calculate Total Amount.How to calculate this Amount. Plz help me ..I am waiting for ur response... As for example TxnType Amount Wihtdraw 5000 Deposit 4000 Deposit 7000 withdraw 2000 ---------------------------- BalenceAmt 4000 Thanks in advance Anup
  12. Hi, I dont want to use Query.Is there any properties in Detail Section ,or can i write PrintWhenExpression in detail Area. and i can pass parameter value in a report. plz help me.I am waiting for ur reply. Thanks in Advance
  13. Hi, I m using jasper report3.6.i want to generate top ten record in a report.Actually my requirement is suppose user select 5 then report should be generated 5 record only.similarly user select 10 then 10 record should be generated. if any solution plz help me.. Thanks in Advance
  14. Yes you are partially correct. What I want over here is, as said earlier, each sub report has its own query. Now, in one of the subreport- say A I am doing sum on the column. This sum value is needed by me in another subreport B. Is there a solution to this?
  15. Hi, I am using jasper report .I have 4 subreport and each subreport have a Seperate-2 Query .My Report is generated fine but my requirement is different.Actually i want to use 2nd subreport query (i.e i want to take one column Field from 2nd subreport Query ) to display in 3rd subreport . plz give me solution . Thanks in advance Anup
  16. Hi, I am using jasper report3.6.Have a report having 3,4 subreports. I have a requirement where I am summing a columns total in say subreport 1. I want to have this value in a field of subreport 2. Using this value I will do certain calculations. My problem is how to pass this value to another subreport which is within the same main report. What should be the evaluation time value. Kindly let me know in full details. Thanks&Regards Anup
  17. Hi, I am using jasper report3.6. I have created a report that has 1 column with value A or B. I have another numeric column whose Sum total is being shown at the bottom of the numeric column. The catch is that if the value is 'B' I want to subtract the amount and if the value is 'A' I want to add the amount to the total. For this I have used a condition in the 'Text field Expression' property. Here I add a '-' sign to the column amount. When the report is generated I can see the numeric figures as -ve or +ve but the summation is still not deducting the amount. It is still summing all of them. How should I go about solving this issue?Pls help me..Awaiting for ur response.... Thanks&Regards Anup
  18. Hi, I am using jasper report3.6. I have created a report that has 1 column with value A or B. I have another numeric column whose Sum total is being shown at the bottom of the numeric column. The catch is that if the value is 'B' I want to subtract the amount and if the value is 'A' I want to add the amount to the total. For this I have used a condition in the 'Text field Expression' property. Here I add a '-' sign to the column amount. When the report is generated I can see the numeric figures as -ve or +ve but the summation is still not deducting the amount. It is still summing all of them. How should I go about solving this issue?Pls help me..Awaiting for ur response.... Thanks&Regards Anup
  19. Hi, I m using ireport 3.6. i have calculated percentage in each row. i want to show the sum of these percentage in footer .I m not using in built Percentage.I m using seperate field and drag & Drop it .In TextField Expression i have selected Auto to calculate each row % which is working fine. I have stored the percentage value in a variable and trying to show the sum in footer.its not getting calculated properly. plz help to achieve this. Thanks&regards Anup
  20. Hi, I m using ireport 3.6. i have done percentage in each row.but I m getting problem is i want to sum Total in footer Area.I m not using in built Percentage.I m using seperate field and take drag & Drop ,and in TextField Expression i have selected Auto.Its working fine.I take another variable TotoalSumPercentage and take drag&drop in footer area.null value i m getting. so i m sending my jrxml and java code also plz check it where i m missing in JRXML. Market Price %MktPrice 30 37.50 50 67.50 Tot 80 100.00(?) i want to calculate that row 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="reportsumpercentage" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <field name="MKT_PRC" class="java.math.BigDecimal"/> <field name="percentageCalculate" class="java.math.BigDecimal"/> <variable name="total" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{MKT_PRC}]]></variableExpression> </variable> <variable name="TotalSumPercentage" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{percentageCalculate}]]></variableExpression> </variable> <group name="sumpercentage"> <groupFooter> <band height="33"> <textField> <reportElement x="64" y="7" width="44" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression> </textField> <staticText> <reportElement x="7" y="6" width="41" height="20"/> <textElement/> <text><![CDATA[Total]]></text> </staticText> <staticText> <reportElement x="175" y="5" width="74" height="20"/> <textElement/> <text><![CDATA[Total%Sum]]></text> </staticText> <textField> <reportElement x="249" y="7" width="56" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{TotalSumPercentage}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="19" splitType="Stretch"/> </title> <pageHeader> <band height="10" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="41" splitType="Stretch"> <staticText> <reportElement x="4" y="12" width="56" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font isBold="true"/> </textElement> <text><![CDATA[Market price]]></text> </staticText> </band> </columnHeader> <detail> <band height="36" splitType="Stretch"> <textField> <reportElement x="60" y="12" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{MKT_PRC}]]></textFieldExpression> </textField> <textField evaluationTime="Auto"> <reportElement x="249" y="12" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[(($F{MKT_PRC}/$V{total})*100)]]></textFieldExpression> </textField> </band> </detail> </jasperReport>
  21. Hi, each row percentage calculate is fine but i want to TotalSumPercentage in footer Area.so plz help me how to calculate Total% in footer area? Thanks Anup
  22. Hi, I m using ireport 3.6. i have done percentage in each row.but I m getting problem is i want to sum Total in footer Area.I m not using in built Percentage.I m using seperate field and take drag & Drop ,and in TextField Expression i have selected Auto.Its working fine. Amount percentageAmount 30 37.500 50 62.500 Total% = 100.00(?) I m sending jrxml and java code also .plz check it and where i m missing error in JRXMl. Plz help me .i m trying so many days but i didnt solved it 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="reportsumpercentage" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <field name="MKT_PRC" class="java.math.BigDecimal"/> <field name="calp" class="java.math.BigDecimal"/> <field name="perrr" class="java.math.BigDecimal"/> <field name="sumval" class="java.math.BigDecimal"/> <variable name="total" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{MKT_PRC}]]></variableExpression> </variable> <variable name="calpercentage" class="java.math.BigDecimal" resetType="None"> <variableExpression><![CDATA[(($F{MKT_PRC}/$V{total})*100)]]></variableExpression> </variable> <variable name="totalcalpercentage" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{calp}]]></variableExpression> </variable> <variable name="totalsumper" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{calp}]]></variableExpression> </variable> <group name="sumpercentage"> <groupFooter> <band height="33"> <textField> <reportElement x="60" y="7" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression> </textField> <staticText> <reportElement x="7" y="6" width="41" height="20"/> <textElement/> <text><![CDATA[Total]]></text> </staticText> <textField> <reportElement x="126" y="7" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{totalsumper}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="19" splitType="Stretch"/> </title> <pageHeader> <band height="10" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="41" splitType="Stretch"> <staticText> <reportElement x="4" y="12" width="56" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font isBold="true"/> </textElement> <text><![CDATA[Market price]]></text> </staticText> </band> </columnHeader> <detail> <band height="36" splitType="Stretch"> <textField> <reportElement x="4" y="12" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{MKT_PRC}]]></textFieldExpression> </textField> <textField evaluationTime="Auto"> <reportElement x="126" y="12" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[(($F{MKT_PRC}/$V{total})*100)]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="8" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="5" splitType="Stretch"/> </pageFooter> <summary> <band height="7" splitType="Stretch"/> </summary></jasperReport>=============java code===========package demo.view;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import net.sf.jasperreports.engine.JRDataSource;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JasperCompileManager;import net.sf.jasperreports.engine.JasperExportManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.JasperReport;import net.sf.jasperreports.engine.data.JRMapCollectionDataSource;import net.sf.jasperreports.engine.fill.JRFiller;public class SumPercentageReport { public static void main(String[] args) { JRDataSource simpleDS; List masterList = new ArrayList(); // Detail data Map<String, Object> dataMap = new HashMap<String, Object>(); //for(int i = 0; i<5;i++) { dataMap = new HashMap<String, Object>(); dataMap.put("ASSET_TYP","Equity"); dataMap.put("INSTR_ID","10001"); dataMap.put("INSTR_NAME","anup"); dataMap.put("FOLIO_CURR",100); dataMap.put("QTY",10); dataMap.put("PRICE",20); dataMap.put("BK_VAL",10); dataMap.put("MKT_PRC",30); dataMap.put("MKT_VAL",10); dataMap.put("UNRGL",5); dataMap.put("RUNRGL",10); dataMap.put("RMKT_VAL",10); dataMap.put("FamilyId","NS001"); dataMap.put("ClientId","RS001"); dataMap.put("PortfolioId","RISI001"); masterList.add(dataMap); //} dataMap = new HashMap<String, Object>(); dataMap.put("ASSET_TYP","Equity"); dataMap.put("INSTR_ID","10001"); dataMap.put("INSTR_NAME","anup"); dataMap.put("FOLIO_CURR",100); dataMap.put("QTY",10); dataMap.put("PRICE",20); dataMap.put("BK_VAL",10); dataMap.put("MKT_PRC",50); dataMap.put("MKT_VAL",10); dataMap.put("UNRGL",5); dataMap.put("RUNRGL",10); dataMap.put("RMKT_VAL",10); dataMap.put("FamilyId","NS001"); dataMap.put("ClientId","RS001"); dataMap.put("PortfolioId","RISI001"); masterList.add(dataMap); simpleDS = new JRMapCollectionDataSource(masterList); String reportSource = "c:\\reportsumpercentage.jrxml"; try { JasperReport jasperReport = JasperCompileManager.compileReport(reportSource); JasperPrint jasperPrint = JRFiller.fillReport(jasperReport, new HashMap(),simpleDS); JasperExportManager.exportReportToPdfFile(jasperPrint, "c:/test111.pdf"); //JasperViewer.viewReport(jasperPrint); } catch (JRException ex) { ex.printStackTrace(); } }}
  23. Hi, I m using ireport 3.6. i have done percentage in each row.but I m getting problem is i want to sum Total in footer Area.I m not using in built Percentage.I m using seperate field and take drag & Drop ,and in TextField Expression i have selected Auto.Its working fine. Amount percentageAmount 30 37.500 50 62.500 Total% = 100.00(?) I m sending jrxml and java code also .plz check it and where i m missing error in JRXMl. Plz help me .i m trying so many days but i didnt solved it .. Code:jrxml============<?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="reportsumpercentage" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <field name="MKT_PRC" class="java.math.BigDecimal"/> <field name="calp" class="java.math.BigDecimal"/> <field name="perrr" class="java.math.BigDecimal"/> <field name="sumval" class="java.math.BigDecimal"/> <variable name="total" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{MKT_PRC}]]></variableExpression> </variable> <variable name="calpercentage" class="java.math.BigDecimal" resetType="None"> <variableExpression><![CDATA[(($F{MKT_PRC}/$V{total})*100)]]></variableExpression> </variable> <variable name="totalcalpercentage" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{calp}]]></variableExpression> </variable> <variable name="totalsumper" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[(($F{MKT_PRC}/$V{total})*100)]]></variableExpression> </variable> <group name="sumpercentage"> <groupFooter> <band height="33"> <textField> <reportElement x="60" y="7" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{total}]]></textFieldExpression> </textField> <staticText> <reportElement x="7" y="6" width="41" height="20"/> <textElement/> <text><![CDATA[Total]]></text> </staticText> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="19" splitType="Stretch"/> </title> <pageHeader> <band height="10" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="41" splitType="Stretch"> <staticText> <reportElement x="4" y="12" width="56" height="20"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font isBold="true"/> </textElement> <text><![CDATA[Market price]]></text> </staticText> </band> </columnHeader> <detail> <band height="36" splitType="Stretch"> <textField> <reportElement x="4" y="12" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{MKT_PRC}]]></textFieldExpression> </textField> <textField> <reportElement x="126" y="9" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{calpercentage}]]></textFieldExpression> </textField> <textField evaluationTime="Auto"> <reportElement x="245" y="9" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[(($F{MKT_PRC}/$V{total})*100)]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="8" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="5" splitType="Stretch"/> </pageFooter> <summary> <band height="7" splitType="Stretch"/> </summary></jasperReport>end jrxml ===============java code===========package demo.view;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import net.sf.jasperreports.engine.JRDataSource;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JasperCompileManager;import net.sf.jasperreports.engine.JasperExportManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.JasperReport;import net.sf.jasperreports.engine.data.JRMapCollectionDataSource;import net.sf.jasperreports.engine.fill.JRFiller;public class SumPercentageReport { public static void main(String[] args) { JRDataSource simpleDS; List masterList = new ArrayList(); // Detail data Map<String, Object> dataMap = new HashMap<String, Object>(); //for(int i = 0; i<5;i++) { dataMap = new HashMap<String, Object>(); dataMap.put("ASSET_TYP","Equity"); dataMap.put("INSTR_ID","10001"); dataMap.put("INSTR_NAME","anup"); dataMap.put("FOLIO_CURR",100); dataMap.put("QTY",10); dataMap.put("PRICE",20); dataMap.put("BK_VAL",10); dataMap.put("MKT_PRC",30); dataMap.put("MKT_VAL",10); dataMap.put("UNRGL",5); dataMap.put("RUNRGL",10); dataMap.put("RMKT_VAL",10); dataMap.put("FamilyId","NS001"); dataMap.put("ClientId","RS001"); dataMap.put("PortfolioId","RISI001"); masterList.add(dataMap); //} dataMap = new HashMap<String, Object>(); dataMap.put("ASSET_TYP","Equity"); dataMap.put("INSTR_ID","10001"); dataMap.put("INSTR_NAME","anup"); dataMap.put("FOLIO_CURR",100); dataMap.put("QTY",10); dataMap.put("PRICE",20); dataMap.put("BK_VAL",10); dataMap.put("MKT_PRC",50); dataMap.put("MKT_VAL",10); dataMap.put("UNRGL",5); dataMap.put("RUNRGL",10); dataMap.put("RMKT_VAL",10); dataMap.put("FamilyId","NS001"); dataMap.put("ClientId","RS001"); dataMap.put("PortfolioId","RISI001"); masterList.add(dataMap); simpleDS = new JRMapCollectionDataSource(masterList); String reportSource = "c:\\reportsumpercentage.jrxml"; try { JasperReport jasperReport = JasperCompileManager.compileReport(reportSource); JasperPrint jasperPrint = JRFiller.fillReport(jasperReport, new HashMap(),simpleDS); JasperExportManager.exportReportToPdfFile(jasperPrint, "c:/test111.pdf"); //JasperViewer.viewReport(jasperPrint); } catch (JRException ex) { ex.printStackTrace(); } }}finished java code==
×
×
  • Create New...