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

kgentile1010

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 kgentile1010

  1. Hi, So, we decided this was too much work to build and support using Jasper Reports. The final answer is you really need to build a tree control on top of the html (maybe using ajax). So, at this point for the drill down/tree control we're looking for other solutions that aren't Jasper. Sorry we didn't get something going here. :(
  2. Hi, So, I've come up with this design for drill down reports. It's a lot of work and not easily extensible. Can one of the forum admin look at my ideas and let me know if there is a better way, (please I hope). So, I read somewhere in the forum that to implement the drill down, we need to -- create the report -- have each dimension field be a url to a subreport/newreport -- the subreport/newreport would be a 'drill down' version of the same report. =================================== Here are my ideas and problems For each drill down depth/level, I create a report. To illustrate, my dimension is locations -- corp -- division -- store.. My first report would be a list of locations and counts at the top corporate level Corp Office 1 Corp Office 2 Corp Office 3 When I click on the Corp Office 1 - as a link, it would run a NEW report that would return data and counts for Corp level and the Division level. The report would be built to return the data as follows Corp Office 1 Division A Division B Division C Corp Office 2 Division D Division E Division F Corp Office 3 Division G Division H THEN, to display only the level 2 fields under the Corp Office 1 section, I thought I could use a PrintWhen expression to NOT print the other level 2, I can use the 'parentlocation_id' to filter on that. At this point, the Division Field data would also become links, and then clicking them would go to the servlet, pass in the parentlocation_id and then run a new report that would show level1, level2, and level3. report. Which would show the following Corp Office 1 Division A Division B Store 123 Store 234 Store 345 Store 456 Division C Corp Office 2 Division D Division E Division F Corp Office 3 Division G Division H Again I'd try to use the PrintWhen expression to only print the data for Corp Office 1, DivisionB, stores ==================================== My questions -- 1) will this work? and 2) is there an EASIER way. this is gonna take us a lot of work. Are there any shortcuts? Or any other ideas? Are there ways I can work with the data to do this? ================================================
  3. OK, so openreports works, but with overhead. Same with Jasper Intelligence, works, but you need to run a server. We're working on trying out the servlet solution, so let me know how it goes if you try it. I'll post here when we're done and let you know if it works.
  4. Hi, Thanks so much. That works. I did use the other method in another report with the Auto. That worked too. And a third way, doing the total calculation in a method in the Scriptlet and then calling it in the Text Field We're trying all the ways. :) thanks again. Kim
  5. Hi, I'm writing a report that has the % Total for each row of a group. Since we don't know the total before we finish filling the group, I'm using a sub-report. My percent total is count/totalcount. A posting in the forum said I could pass the count into the subreport as a parameter and calculate $P{count}/$V{TOTALCOUNT}. Below is my data NAME STATUS SCORE COUNT ------------------ ------------ ------------- ----- Safety Hired Average 2 Safety Hired Above Average 12 Safety Pre-Screened Average 345 Safety Pre-Screened Above Average 679 Safety Pre-Screened Below Average 19 My problem is the $V{TOTALCOUNT} is not counting the last row in my data when I use it in a $V{PERCENTTOTAL} calculation. I've added some parameter defaults to simulate the data I pass to the report. The defaults and filters -- $P{name} set to Safety -- $P{count} set to new Integer(345) I have some PrintWhen expressions In the Filter expression for the report query I filter on status new Boolean(($F{status}.equals(new String("Pre-Screened")))) For each Text Field Expression I filter -- new Boolean($F{name}.equals($P{name})) If I run the report and return $F{count} $P{count} $V{TOTALCOUNT} $V{PERCENTTOTAL} I get the following 19 345 1043 33.69% I should not get 33.69%, I should be getting 345/1043 as a percent, which is 33.07% In all my data groups, I can see that the totalcount is calculated correctly, but the last value in my row doesn't get used to calculate the percent. I've attached the report, can you see what's wrong? Thank you so much for your help. I truly appreciate it. My report jrxml is below. <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="PercentTest2" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="396" pageHeight="708" columnWidth="396" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false" isIgnorePagination="true"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="name" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA["Safety"]]></defaultValueExpression> </parameter> <parameter name="score" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="count" isForPrompting="false" class="java.lang.Integer"> <defaultValueExpression ><![CDATA[new Integer(345)]]></defaultValueExpression> </parameter> <field name="name" class="java.lang.String"/> <field name="status" class="java.lang.String"/> <field name="count" class="java.lang.Integer"/> <variable name="PERCENTTOTAL" class="java.lang.Float" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[new Float($P{count}.floatValue()/$V{TOTALCOUNT}.floatValue())]]></variableExpression> </variable> <variable name="TOTALCOUNT" class="java.lang.Integer" resetType="Group" resetGroup="NAME" calculation="Sum"> <variableExpression><![CDATA[$F{count}]]></variableExpression> </variable> <filterExpression><![CDATA[new Boolean(($F{status}.equals(new String("Pre-Screened"))))]]></filterExpression> <group name="NAME" > <groupExpression><![CDATA[$F{name}]]></groupExpression> <groupHeader> <band height="0" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="20" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="#,##0.00 %" isBlankWhenNull="false" evaluationTime="Group" evaluationGroup="SCORE" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="320" y="0" width="50" height="20" key="textField" positionType="Float" isRemoveLineWhenBlank="true"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font size="11"/> </textElement> <textFieldExpression class="java.lang.Float"><![CDATA[$V{PERCENTTOTAL}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="0" width="60" height="20" key="textField"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{count}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="60" y="0" width="80" height="20" key="textField"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$P{count}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="170" y="0" width="140" height="20" key="textField"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{TOTALCOUNT}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <group name="SCORE" > <groupExpression><![CDATA[$P{score}]]></groupExpression> <groupHeader> <band height="0" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="0" isSplitAllowed="true" > </band> </groupFooter> </group> <background> <band height="2" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="0" isSplitAllowed="true" > </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> </jasperReport>
  6. Hi, I'm writing a report that has the % Total for each row of a group. Since we don't know the total before we finish filling the group, I'm using a sub-report. My percent total is count/totalcount. A posting in the forum said I could pass the count into the subreport as a parameter and calculate $P{count}/$V{TOTALCOUNT}. Below is my data NAME STATUS SCORE COUNT ---------------- ------------ ------------- ----- Safety Hired Average 2 Safety Hired Above Average 12 Safety Pre-Screened Average 345 Safety Pre-Screened Above Average 679 Safety Pre-Screened Below Average 19 My problem is the $V{TOTALCOUNT} is not counting the last row in my data when I use it in a $V{PERCENTTOTAL} calculation. I've added some parameter defaults to simulate the data I pass to the report. The defaults and filters -- $P{name} set to Safety -- $P{count} set to new Integer(345) I have some PrintWhen expressions In the Filter expression for the report query I filter on status new Boolean(($F{status}.equals(new String("Pre-Screened")))) For each Text Field Expression I filter -- new Boolean($F{name}.equals($P{name})) If I run the report and return in the name group band $F{count} $P{count} $V{TOTALCOUNT} $V{PERCENTTOTAL} I get the following 19 345 1043 33.69% I should not get 33.69%, I should be getting 345/1043 as a percent, which is 33.07% In all my data groups, I can see that the totalcount is calculated correctly, but the last value in my row doesn't get used to calculate the percent. I've attached the report, can you see what's wrong? Thank you so much for your help. I truly appreciate it. My report jrxml is below. <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="PercentTest2" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="396" pageHeight="708" columnWidth="396" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false" isIgnorePagination="true"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="name" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA["Safety"]]></defaultValueExpression> </parameter> <parameter name="score" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="count" isForPrompting="false" class="java.lang.Integer"> <defaultValueExpression ><![CDATA[new Integer(345)]]></defaultValueExpression> </parameter> <field name="name" class="java.lang.String"/> <field name="status" class="java.lang.String"/> <field name="count" class="java.lang.Integer"/> <variable name="PERCENTTOTAL" class="java.lang.Float" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[new Float($P{count}.floatValue()/$V{TOTALCOUNT}.floatValue())]]></variableExpression> </variable> <variable name="TOTALCOUNT" class="java.lang.Integer" resetType="Group" resetGroup="NAME" calculation="Sum"> <variableExpression><![CDATA[$F{count}]]></variableExpression> </variable> <filterExpression><![CDATA[new Boolean(($F{status}.equals(new String("Pre-Screened"))))]]></filterExpression> <group name="NAME" > <groupExpression><![CDATA[$F{name}]]></groupExpression> <groupHeader> <band height="0" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="20" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="#,##0.00 %" isBlankWhenNull="false" evaluationTime="Group" evaluationGroup="SCORE" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="320" y="0" width="50" height="20" key="textField" positionType="Float" isRemoveLineWhenBlank="true"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font size="11"/> </textElement> <textFieldExpression class="java.lang.Float"><![CDATA[$V{PERCENTTOTAL}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="0" width="60" height="20" key="textField"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{count}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="60" y="0" width="80" height="20" key="textField"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$P{count}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="170" y="0" width="140" height="20" key="textField"> <printWhenExpression><![CDATA[new Boolean($F{name}.equals($P{name}))]]></printWhenExpression> </reportElement> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{TOTALCOUNT}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <group name="SCORE" > <groupExpression><![CDATA[$P{score}]]></groupExpression> <groupHeader> <band height="0" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="0" isSplitAllowed="true" > </band> </groupFooter> </group> <background> <band height="2" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="0" isSplitAllowed="true" > </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> </jasperReport>
  7. I did see some posts about creating a link on the row where you want to drill down -- the link will call a servlet (that you write). The servlet takes parameter information and then runs a new jasper report showing the next level for the drill down. you can use Jasper Intelligence. I also found an open source product OpenReports. This product supports drilldown. I'm looking at that for a solution. http://www.oreports.com/ If you find anything else, please let me know. thanks Kim
  8. Hi, Did you all find a solution for this. I also need to do this. From what I've seen, you need to run a new report when you click the + (the drill down) and in the new report, you show the next level. To do that you need to create your own servlet that takes the hyperlink and then runs the report. Is that how you did it? Thanks kgentile1010
  9. Hi, I'm seeing this issue also. I'm using iReport/JasperReports 1.2.8, so not running through a WebApp. Thank you so much for your help. Kgentile
  10. Hi, I'm seeing this issue also. I'm using iReport/JasperReports 1.2.8, so not running through a WebApp. Thank you so much for your help. Kgentile
  11. Hi, I have searched the forums, but don't see any information on this type of question. When I run my jasperreports from a JSP inside a web application in JBOSS, I don't get any logging to the server.log or any other log that I can find. My application implements log4j, but it looks like jasperreports is implementing commons-logging?? I don't know much about how to set up the logging. Can you please point me to a post or give me some information about that? Thank you so much for your help. I truly appreciate it. kgentile
  12. Hi, I'd love to get this code. When I go to the link, I don't have permission to access the message. Can you please post the class code here? I would appreciate it. Thanks so much. -- OOPS never mind. I found it on another post. thank you so much. ;) Post edited by: kgentile1010, at: 2006/12/01 19:10
  13. Hi, In the new version for irReports, you can set it as a chart property. I'm using Jasper Reports/iReport-1.2.8. to get there -- Double click on the chart -- Click on the Chart tab -- Click edit chart properties Go to the parameter -- Legend Font. You can change it here. or you can change it in the jrxml. Here's my Pie Chart xml form the jrxml file. Your JasperReports version needs to be 1.2.7+ <pieChart> <chart hyperlinkTarget="Self" customizerClass="TestFormat" > <reportElement x="14" y="13" width="170" height="134" key="element-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <chartLegend textColor="#000000" backgroundColor="#FFFFFF" > <font fontName="SansSerif" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false" pdfEncoding="Cp1252"/> </chartLegend> </chart> <pieDataset> <dataset resetType="Group" resetGroup="Traits" > </dataset> <keyExpression><![CDATA[$F{SCORE}]]></keyExpression> <valueExpression><![CDATA[$F{COUNT}]]></valueExpression> <labelExpression><![CDATA[null]]></labelExpression> <sectionHyperlink > </sectionHyperlink> </pieDataset> <piePlot> <plot backcolor="#CCCCFF" /> </piePlot> </pieChart> I also did try to use the Chart Customizer class. But I'm running into an issue where the first legend isn't modified, in my groups. The second and all subsequent legends do use the 8 font size.
  14. Hi, In iReports if you create a new report, and new group, all the bands are vertical in the report. For Example, ---------------- background title page . . my group . . page footer last page footer summary ---------------- I would like the bands to go horizontally across the page. |background |title|... |mygroup|.. |page footer|... Is there a way to change the groups so that they are defined across the report page horizontal? The reason I want that is because I have two groups. Group 1 has three rows returned in a grid(it's a subreport) Group 2 is a summary chart (again a subreport) of that grid data. I want to display them next to each other horizontally Grid report | Summary Graph Report It would work if I could get the groups to be Horizontal. I'm so close :) Thanks for your help Kim
×
×
  • Create New...