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

sneatherlin

Members
  • Posts

    12
  • Joined

  • Last visited

sneatherlin'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. Thanks a million:woohoo: that was it. Unfortunately it came too late and my boss has tasked another developer with coming up with a different solution than using iReports and JasperReports. So I am taken off the project. Think you have a really nice application and much good luck. Sam
  2. When I create a report in iReports v 1.2.5 that has a chart in it I can take my Jasper file put it in my templates folder and view my report from my Java app. When I add a Subreport to the report whether I make it via the Wizard or on my own the report comes back totally blank. Anyone come across this also? Thank you
  3. Thank you, I was having the same problem when setting compatability to v 1.2.5 my chart would show no data. Putting java.lang.Boolean.TRUE in Chart Properties/Chart Data/Increment When Expression made my data display. Could you tell me why that statement caused the data to display? I don't want to use your valuable suggestions and not understand why they are used. Again thank you so much for your help. Now if I can figure out why my Sub-Reports don't work. Sam :whistle:
  4. Posting again lol, I have iReports v 1.2.5 (Compatability set to v 1.2.2). With this setting I have successfully created jasper files, placed them into a reports directory to be used by my Java WebApp. If I change compatablity I lose my bars on my charts this is when viewing in iReports viewer. I am able to get Subreports working and displaying in iReports. When I move to my Reports directory (all I am placing in Reports directory is the Master Jasper file and the SubReport Jasper file) Subreports no longer work. I get no error just a plank page where my pdf report should be. Unless I prove this application to be something to use for the future I am unable to purchase the guide with company funds and unable to afford on my own. When I can demonstrate success by getting a report to work on our as400 then I will be able to purchase book to learn the finer details of the application. I understand the moderators and other members of this forum have limited time and stand amazed they can answer as many questions as they do. I am in need of something to help me, on my own, in getting iReports + JasperReports working. Please point me in the need directions to help me understand how to do so. I am new to Java also which doesn't help matters any. I come from a Microsoft shop background where examples are everywhere for most anything you want to do. With this though I feel like I have hit a brick wall at 100mph lol. There is an abundance of sites that may have answers but either in Spanish, Russian, and plethora of other languages that I am unable to comprehend. I can find nothing though that says ok, you want to do something, here are the steps and why. Any help would be greatly appreciated. Maybe my googling skills were not up to the challenge :unsure: Respectfully, Sam
  5. I have an jasper file working in v 1.2.5 that when I (within iReports) execute report and see results in viewer I can see the charts and values when compatability is set to v 1.2.0 but when compatability is set to v 1.2.5 I see the Chart but not the values. Everything else works as expected, minus still fighting the sub-reports issue. I had forgotten I had changed the compatablity to v 1.2.0 earlier and when I saw this I set it to v 1.2.5 in hopes that would solve Sub-reports issue. Sam:side:
  6. I am working my way through this (With the help of this group ;) that is). I have finally gotten reports to display using a iReports v 1.2.5 compiled jasper file. I'm taking baby steps in trying to learn this. My currently working file displays a simple detail along with a chart in the Summary. To get the Chart to work I had to not only add the JFreeCharts jar to the web-inf/lib folder but in Eclipse add it as an External Jar in the Build path. My subsequent goal is to add sub-reports. Again I can achieve this in iReports but when I move to my Web-App I again get a blank page displayed. Is there another Jar file that I need to add as an External Jar file in my build path? I wish I was as fortunate to just copy and it worked out of the box lol, I am positive user error is involved but hope to get past both user and other errors to get everything I can from this tool that I feel it can deliver. Thank you for your help in advance. Sam
  7. vij Thank you for your help. I cleared out the lib folder for my Webapp and readded the files that Eclipse told me I was missing and used the files from the dist folder for 1.2.5. This time I at least got an error that stated a method for building a chart was not found. So I added the JFreeChart jar file and I was back at empty page being displayed. So I threw in everything and the kitchen sink from the iReports 1.2.5 lib folder into my webapp lib folder and shazam it worked. Hopefully Jaspersoft/iReports/JasperReports will come out with a distribution list of the basic files needed to run reports from Browser or other scenarios. I'm new to Java and OpenSource applications so not used to the lack of documentation provided users. But again thank you vij for taking time to help me, it is greatly appreciated. Sam
  8. I have posted in here about my situation already but am in desperate need of help. I am trying to display a pdf report to the browser on my pc (interim step before moving to as/400). I am using Java servlet to try and do this. I have code within my servlet that has successfully executed and displayed pdf to browser. I used iReports version 1.2.3 to create and compile the jasper file used as template. Having seen version 1.2.4 then version 1.2.5 released I have tried unsuccessfully to achieve the same results. Obviously (at least to me lol) it is a version issue. iReports works as expected and all versions display report to me when compiling. My guess is that I do not have the files (jars) needed in my classpath/lib that are needed to display these reports compiled in newer versions. I am at a new job, learning new technology (Java) and was given the task of evaluating JasperReports and iReports as a path to our building online reports. Due to my initial success with previous versions I exclaimed the benefits of choosing these technologies. Then reality set in and now frustration is setting in trying to get these new versions running and having no success. My boss is frustrated and does not understand why it is taking so long. I have googled till I can't google no more, and admittedly may have missed the forum/site needed to assist me. I am have tried to resolve the issue on my own, but admit I need the help of more experienced peers. I still believe that JasperReports with iReports is our best solution just can't get over this hump. Some success would even maybe merit me being able to get the documentation. What jar files do I need to have in the lib directory? What jar files do I need to add to the classpath? where do the java files created when compiling go? Do I even need them if I am not doing any customization from within them yet? I know everyone has their own projects to work on and help when they can, but as soon as someone can any help would be greatly appreciated. With most Respect, Sam
  9. Found the config files that are shared between the different versions of iReports and deleted then reinstalled. Got my menu back. Cheers
  10. The menu on the iReports ide has changed to binary (i'm assuming) just showing boxes where menu words used to be. I have unistalled, installed on the chance that a config file or some file had gotten corrupted, even rebooted pc. Has had no affect. Please help as soon as possible, this has stopped my development. Thank you, Sam
  11. Thank you for your response. I am getting no exceptions. Here is the jrxml that is in my templates file for ver 1.2.3. <?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="SevenDayOAReport" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.encoding" value="UTF-8" /> <property name="ireport.scriptlethandling" value="0" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString><![CDATA[sELECT ALUSID AS USER_ID, ALIPAD, ALUSTP, MONTH(ALDTTM) AS USE_MONTH, DAYOFMONTH(ALDTTM) AS USE_DAY, YEAR(ALDTTM) AS USE_YEAR, SUBSTRING(DIGITS(MINUTE(ALDTTM)),9,2)AS USE_MIN, TRIM(UFFRNM)AS USER_FIRST_NAME, TRIM(UFNMMI)AS USER_MIDDLE_INITIAL, TRIM(UFLSNM)AS USER_LAST_NAME, CASE HOUR(ALDTTM) WHEN 13 THEN 1 WHEN 14 THEN 2 WHEN 15 THEN 3 WHEN 16 THEN 4 WHEN 17 THEN 5 WHEN 18 THEN 6 WHEN 19 THEN 7 WHEN 20 THEN 8 WHEN 21 THEN 9 WHEN 22 THEN 10 WHEN 23 THEN 11 WHEN 24 THEN 12 ELSE HOUR(ALDTTM) END AS USE_HOUR, CASE HOUR(ALDTTM) WHEN 12 THEN 'PM' WHEN 13 THEN 'PM' WHEN 14 THEN 'PM' WHEN 15 THEN 'PM' WHEN 16 THEN 'PM' WHEN 17 THEN 'PM' WHEN 18 THEN 'PM' WHEN 19 THEN 'PM' WHEN 20 THEN 'PM' WHEN 21 THEN 'PM' WHEN 22 THEN 'PM' WHEN 23 THEN 'PM' WHEN 24 THEN 'PM' ELSE 'AM' END AS USE_AMPM, CASE UFUSTP WHEN 'AG' THEN 'Sales Agent' WHEN 'FH' THEN 'Funeral Home' WHEN 'CH' THEN 'Contract Holder' WHEN 'AY' THEN 'Agency' WHEN 'MG' THEN 'Sales Manager' ELSE UFUSTP END AS USER_TYPE, UFENST AS USER_STATUS, UFFMNM AS USER_FIRM FROM GENMODDTA4.OALOGF, GENMODDTA4.OAUSRFL WHERE ALUSID = UFUSID AND DATE(ALDTTM) >= DATE(NOW()-7 DAY) ORDER BY DATE(ALDTTM), UFUSTP, ALUSID]]></queryString> <field name="USER_ID" class="java.lang.String"/> <field name="ALIPAD" class="java.lang.String"/> <field name="ALUSTP" class="java.lang.String"/> <field name="USE_MONTH" class="java.lang.Integer"/> <field name="USE_DAY" class="java.lang.Integer"/> <field name="USE_YEAR" class="java.lang.Integer"/> <field name="USE_MIN" class="java.lang.String"/> <field name="USER_FIRST_NAME" class="java.lang.String"/> <field name="USER_MIDDLE_INITIAL" class="java.lang.String"/> <field name="USER_LAST_NAME" class="java.lang.String"/> <field name="USE_HOUR" class="java.lang.Integer"/> <field name="USE_AMPM" class="java.lang.String"/> <field name="USER_TYPE" class="java.lang.String"/> <field name="USER_STATUS" class="java.lang.String"/> <field name="USER_FIRM" class="java.lang.String"/> <variable name="USE_DATE" class="java.lang.String" resetType="Column" calculation="Nothing"> <variableExpression><![CDATA[$F{USE_MONTH} + "/" + $F{USE_DAY} + "/" + $F{USE_YEAR}]]></variableExpression> </variable> <variable name="USER_FULL_NAME" class="java.lang.String" resetType="Column" calculation="Nothing"> <variableExpression><![CDATA[$F{USER_FIRST_NAME} + " " + $F{USER_MIDDLE_INITIAL} + " " + $F{USER_LAST_NAME}]]></variableExpression> </variable> <variable name="USE_TIME" class="java.lang.String" resetType="Column" calculation="Nothing"> <variableExpression><![CDATA[$F{USE_HOUR} + ":" + $F{USE_MIN} + " " + $F{USE_AMPM}]]></variableExpression> </variable> <variable name="USE_TOTAL_BY_TYPE" class="java.lang.Integer" resetType="Group" resetGroup="user_type" calculation="Count"> <variableExpression><![CDATA[$V{COLUMN_COUNT}]]></variableExpression> </variable> <group name="oa_use_date" isStartNewColumn="true" isStartNewPage="false" isResetPageNumber="false" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="0" > <groupExpression><![CDATA[$V{USE_DATE}]]></groupExpression> <groupHeader> <band height="20" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Group" evaluationGroup="oa_use_date" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="1" y="1" width="142" height="18" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{USE_DATE}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="50" isSplitAllowed="true" > </band> </groupFooter> </group> <group name="user_type" isStartNewColumn="false" isStartNewPage="false" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" > <groupExpression><![CDATA[$F{USER_TYPE}]]></groupExpression> <groupHeader> <band height="20" isSplitAllowed="true" > <rectangle radius="0" > <reportElement mode="Opaque" x="1" y="1" width="532" height="18" forecolor="#000000" backcolor="#CCCCCC" key="rectangle-2" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </rectangle> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="36" y="2" width="100" height="15" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{USER_TYPE}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="43" isSplitAllowed="true" > <line direction="TopDown"> <reportElement mode="Opaque" x="49" y="1" width="325" height="0" forecolor="#000000" backcolor="#FFFFFF" key="line-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </line> <staticText> <reportElement mode="Opaque" x="49" y="2" width="37" height="13" forecolor="#000000" backcolor="#FFFFFF" key="staticText-2" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Total:]]></text> </staticText> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="87" y="2" width="81" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{USER_TYPE}]]></textFieldExpression> </textField> <staticText> <reportElement mode="Opaque" x="169" y="2" width="60" height="13" forecolor="#000000" backcolor="#FFFFFF" key="staticText-3" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Logins]]></text> </staticText> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="230" y="2" width="78" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{USE_TOTAL_BY_TYPE}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="26" isSplitAllowed="true" > <rectangle radius="0" > <reportElement mode="Opaque" x="0" y="0" width="533" height="26" forecolor="#000000" backcolor="#CCCCCC" key="rectangle-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </rectangle> <staticText> <reportElement mode="Transparent" x="8" y="1" width="517" height="24" forecolor="#000000" backcolor="#FFFFFF" key="staticText-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="17" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Online Access User Report - Past Seven Days]]></text> </staticText> </band> </title> <pageHeader> <band height="29" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="14" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="49" y="0" width="163" height="12" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="false" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="5" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{USER_FULL_NAME}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="212" y="0" width="163" height="12" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="5" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{USE_TIME}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="37" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="25" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="26" isSplitAllowed="true" > </band> </summary> </jasperReport> Here is the jrxml file in my templates folder for version 1.2.5 <?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="SevenDayOAReport" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <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.*" /> <queryString><![CDATA[sELECT ALUSID AS USER_ID, ALIPAD, ALUSTP, MONTH(ALDTTM) AS USE_MONTH, DAYOFMONTH(ALDTTM) AS USE_DAY, YEAR(ALDTTM) AS USE_YEAR, SUBSTRING(DIGITS(MINUTE(ALDTTM)),9,2)AS USE_MIN, TRIM(UFFRNM)AS USER_FIRST_NAME, TRIM(UFNMMI)AS USER_MIDDLE_INITIAL, TRIM(UFLSNM)AS USER_LAST_NAME, CASE HOUR(ALDTTM) WHEN 13 THEN 1 WHEN 14 THEN 2 WHEN 15 THEN 3 WHEN 16 THEN 4 WHEN 17 THEN 5 WHEN 18 THEN 6 WHEN 19 THEN 7 WHEN 20 THEN 8 WHEN 21 THEN 9 WHEN 22 THEN 10 WHEN 23 THEN 11 WHEN 24 THEN 12 ELSE HOUR(ALDTTM) END AS USE_HOUR, CASE HOUR(ALDTTM) WHEN 12 THEN 'PM' WHEN 13 THEN 'PM' WHEN 14 THEN 'PM' WHEN 15 THEN 'PM' WHEN 16 THEN 'PM' WHEN 17 THEN 'PM' WHEN 18 THEN 'PM' WHEN 19 THEN 'PM' WHEN 20 THEN 'PM' WHEN 21 THEN 'PM' WHEN 22 THEN 'PM' WHEN 23 THEN 'PM' WHEN 24 THEN 'PM' ELSE 'AM' END AS USE_AMPM, CASE UFUSTP WHEN 'AG' THEN 'Sales Agent' WHEN 'FH' THEN 'Funeral Home' WHEN 'CH' THEN 'Contract Holder' WHEN 'AY' THEN 'Agency' WHEN 'MG' THEN 'Sales Manager' ELSE UFUSTP END AS USER_TYPE, UFENST AS USER_STATUS, UFFMNM AS USER_FIRM FROM GENMODDTA4.OALOGF, GENMODDTA4.OAUSRFL WHERE ALUSID = UFUSID AND DATE(ALDTTM) >= DATE(NOW()-7 DAY) ORDER BY DATE(ALDTTM), UFUSTP, ALUSID]]></queryString> <field name="USER_ID" class="java.lang.String"/> <field name="ALIPAD" class="java.lang.String"/> <field name="ALUSTP" class="java.lang.String"/> <field name="USE_MONTH" class="java.lang.Integer"/> <field name="USE_DAY" class="java.lang.Integer"/> <field name="USE_YEAR" class="java.lang.Integer"/> <field name="USE_MIN" class="java.lang.String"/> <field name="USER_FIRST_NAME" class="java.lang.String"/> <field name="USER_MIDDLE_INITIAL" class="java.lang.String"/> <field name="USER_LAST_NAME" class="java.lang.String"/> <field name="USE_HOUR" class="java.lang.Integer"/> <field name="USE_AMPM" class="java.lang.String"/> <field name="USER_TYPE" class="java.lang.String"/> <field name="USER_STATUS" class="java.lang.String"/> <field name="USER_FIRM" class="java.lang.String"/> <variable name="USE_DATE" class="java.lang.String" resetType="Column" calculation="Nothing"> <variableExpression><![CDATA[$F{USE_MONTH} + "/" + $F{USE_DAY} + "/" + $F{USE_YEAR}]]></variableExpression> </variable> <variable name="USER_FULL_NAME" class="java.lang.String" resetType="Column" calculation="Nothing"> <variableExpression><![CDATA[$F{USER_FIRST_NAME} + " " + $F{USER_MIDDLE_INITIAL} + " " + $F{USER_LAST_NAME}]]></variableExpression> </variable> <variable name="USE_TIME" class="java.lang.String" resetType="Column" calculation="Nothing"> <variableExpression><![CDATA[$F{USE_HOUR} + ":" + $F{USE_MIN} + " " + $F{USE_AMPM}]]></variableExpression> </variable> <variable name="USE_TOTAL_BY_TYPE" class="java.lang.Integer" resetType="Group" resetGroup="user_type" calculation="Count"> <variableExpression><![CDATA[$V{COLUMN_COUNT}]]></variableExpression> </variable> <group name="oa_use_date" isStartNewColumn="true" isReprintHeaderOnEachPage="true" > <groupExpression><![CDATA[$V{USE_DATE}]]></groupExpression> <groupHeader> <band height="20" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Group" evaluationGroup="oa_use_date" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="1" y="1" width="142" height="18" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{USE_DATE}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="50" isSplitAllowed="true" > </band> </groupFooter> </group> <group name="user_type" > <groupExpression><![CDATA[$F{USER_TYPE}]]></groupExpression> <groupHeader> <band height="20" isSplitAllowed="true" > <rectangle radius="0" > <reportElement mode="Opaque" x="1" y="1" width="532" height="18" forecolor="#000000" backcolor="#CCCCCC" key="rectangle-2"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </rectangle> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="36" y="2" width="100" height="15" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{USER_TYPE}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="43" isSplitAllowed="true" > <line direction="TopDown"> <reportElement mode="Opaque" x="49" y="1" width="325" height="0" forecolor="#000000" backcolor="#FFFFFF" key="line-1"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </line> <staticText> <reportElement mode="Opaque" x="49" y="2" width="37" height="13" forecolor="#000000" backcolor="#FFFFFF" key="staticText-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Total:]]></text> </staticText> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="87" y="2" width="81" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{USER_TYPE}]]></textFieldExpression> </textField> <staticText> <reportElement mode="Opaque" x="169" y="2" width="60" height="13" forecolor="#000000" backcolor="#FFFFFF" key="staticText-3"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Logins]]></text> </staticText> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="230" y="2" width="78" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{USE_TOTAL_BY_TYPE}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="26" isSplitAllowed="true" > <rectangle radius="0" > <reportElement mode="Opaque" x="0" y="0" width="533" height="26" forecolor="#000000" backcolor="#CCCCCC" key="rectangle-1"/> <graphicElement stretchType="NoStretch" pen="Thin" fill="Solid" /> </rectangle> <staticText> <reportElement mode="Transparent" x="8" y="1" width="517" height="24" forecolor="#000000" backcolor="#FFFFFF" key="staticText-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="17" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Online Access User Report - Past Seven Days]]></text> </staticText> </band> </title> <pageHeader> <band height="29" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="14" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="49" y="0" width="163" height="12" forecolor="#000000" backcolor="#FFFFFF" key="textField" isPrintRepeatedValues="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="5" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{USER_FULL_NAME}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="212" y="0" width="163" height="12" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#FFFFFF" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="5" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{USE_TIME}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="37" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="25" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="26" isSplitAllowed="true" > </band> </summary> </jasperReport> I feel, like I think you do, that it is a missing jar file that is needed for newer version. I can't find any documentation regarding what files are needed and hate to shotgun it by placing all the jar files that reside in the lib file for iReports into my webapp lib file. Yes iReports for both versions create an identical pdf document. Thank you again for your response and hope to hear from you soon. cheers, Sam
  12. I am new to Java and to JasperReports/iReports. I downloaded JasperReports 1.2.4 and iReports 1.2.3. I am trying to run my report from within a Java Servlet. I am connecting to as/400. Using iReports version 1.2.3 I am able to create jasper file, place into directory used to hold my jasper files on my local machine. When I send in my resultSet to the JasperRunManager.runReportToPdf method I get my pdf with data. Using iReports 1.2.4 and 1.2.5 I create the same report place into directory as above. Again using same code in Java Servlet when I pass in my resultset I get back a blank page. Again I am new to both technologies so may have missed something but would greatly appreciate any help. Did a test this morning taking a .jrxml file and loading it into iReports ver 1.2.3 compiling, took the jasper file created and placed in my webapps report directory and ran. Report showed as expected. Took the same .jrxml file loaded into iReports ver 1.2.5 and compiled. Noticed jasper file was slightly bigger. I took the jasper file and placed into my webapps report directory replacing the 1.2.3 compiled version. Report brings up empty page only. I can switch out the jasper files 1.2.3 will work as expected 1.2.5 continues to show empty page. If anybody can point me to relevant documentation I would be most greatful plus for any help given. I can't understand why one would work and the other one wouldn't. Could it be I don't have all the needed Jar files in the ClassPath? Respectfully, Post edited by: sneatherlin, at: 2006/07/20 14:38
×
×
  • Create New...