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

wizhippo

Members
  • Posts

    12
  • Joined

  • Last visited

wizhippo's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. My numbers are not formatting either, any help would be great
  2. I have a query that is a number of unions that pull data from multiple tables. SELECT 'CURRENT_YEAR' AS D, GLNAME, AMOUNT FROM .... UNION SELCT 'PREVIOUS_YEAR' AS D, GLNAME, AMOUNT FROM ... UNION SELECT 'PLAN' AS D, GLNAME, AMOUNT FROM .... I want to create 'AMOUNT' columns based on the 'D' columns I can do this with a cross tab easy enough. The issue is I need calculated columns based on D and the AMOUNT. eg: CURRENT_YEAR, PREVIOUS_YEAR, PLAN, CURRENT_YEAR-PLAN, CURRENT_YEAR-PREVIOUS_YEAR Any ideas on how to do this?
  3. I am trying to add a text field to a cross report. every time I add a field it resizes all the fields in the column and messes up the layout. Is there any way to bypass or turn off this behavior?
  4. I am using jasperreports / demo / samples / crosstabs / reports / OrdersReport.jrxml as an example for a crosstab report. My problem is that this demo does not work. I get this error com.jaspersoft.ireport.designer.errorhandler.ProblemItem@429fdea9 No comparator expression specified and the order by class is not comparable for crosstab group CountryRow. net.sf.jasperreports.crosstabs.design.JRDesignCrosstabBucket@508892c2 Any ideas as to why this does not work? I would think it should as it is straight from the jasperreports demo code. 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="OrdersReport" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="782" leftMargin="30" rightMargin="30" topMargin="30" bottomMargin="30"> <style name="Sans_Normal" isDefault="true" fontName="DejaVu Sans" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/> <style name="Sans_Bold" isDefault="false" fontName="DejaVu Sans" fontSize="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/> <style name="OrderCountStyle" style="Sans_Normal"> <conditionalStyle> <conditionExpression><![CDATA[new Boolean($V{OrderCount}.intValue() > 0 && $V{OrderCount}.intValue() % 10 == 0)]]></conditionExpression> <style forecolor="#ff0000" isBold="true"/> </conditionalStyle> </style> <style name="CellStyle" mode="Opaque"> <conditionalStyle> <conditionExpression><![CDATA[new Boolean($V{ROW_COUNT}.intValue() % 2 == 0)]]></conditionExpression> <style backcolor="#E0E0E0"/> </conditionalStyle> </style> <queryString><![CDATA[sELECT ShipCountry, Freight, OrderDate FROM Orders]]></queryString> <field name="ShipCountry" class="java.lang.String"/> <field name="Freight" class="java.lang.Float"/> <field name="OrderDate" class="java.sql.Timestamp"/> <title> <band height="35"> <staticText> <reportElement x="0" y="0" width="782" height="35" style="Sans_Bold"/> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text>Number of orders and latest order date by country and freight range.Countries are ordered by number of orders.</text> </staticText> </band> </title> <summary> <band height="60"> <crosstab isRepeatColumnHeaders="false"> <reportElement x="0" y="0" width="782" height="60"/> <crosstabDataset> <dataset/> </crosstabDataset> <rowGroup name="CountryRow" width="80" totalPosition="End"> <bucket order="Descending"> <bucketExpression class="java.lang.String">$F{ShipCountry}</bucketExpression> <orderByExpression>$V{OrderCount}</orderByExpression> </bucket> <crosstabRowHeader> <cellContents style="CellStyle"> <box> <pen lineWidth="1" lineColor="black"/> </box> <textField> <reportElement x="5" y="0" width="75" height="20" style="Sans_Bold"/> <textElement verticalAlignment="Middle"/> <textFieldExpression><![CDATA[$V{CountryRow}]]></textFieldExpression> </textField> </cellContents> </crosstabRowHeader> <crosstabTotalRowHeader> <cellContents> <box> <pen lineWidth="1" lineColor="black"/> </box> <staticText> <reportElement x="5" y="0" width="75" height="20" style="Sans_Bold"/> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text>TOTAL</text> </staticText> </cellContents> </crosstabTotalRowHeader> </rowGroup> <columnGroup name="FreightColumn" height="20" totalPosition="End"> <bucket> <bucketExpression class="java.lang.Integer">new Integer($F{Freight}.intValue()/100)</bucketExpression> </bucket> <crosstabColumnHeader> <cellContents> <box> <pen lineWidth="1" lineColor="black"/> </box> <textField> <reportElement x="0" y="0" width="60" height="20" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression><![CDATA[string.valueOf($V{FreightColumn}.intValue() * 100) + "-" + String.valueOf(($V{FreightColumn}.intValue() + 1) * 100)]]></textFieldExpression> </textField> </cellContents> </crosstabColumnHeader> <crosstabTotalColumnHeader> <cellContents> <box> <pen lineWidth="1" lineColor="black"/> </box> <staticText> <reportElement x="0" y="0" width="60" height="20" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="12"/> </textElement> <text>TOTAL</text> </staticText> </cellContents> </crosstabTotalColumnHeader> </columnGroup> <measure name="OrderCount" class="java.lang.Integer" calculation="Count"> <measureExpression>$F{Freight}</measureExpression> </measure> <measure name="MaxDate" class="java.sql.Timestamp" calculation="Highest"> <measureExpression>$F{OrderDate}</measureExpression> </measure> <crosstabCell width="60" height="20"> <cellContents style="CellStyle" mode="Transparent"> <box> <pen lineColor="black"/> <bottomPen lineWidth="0.5"/> <rightPen lineWidth="0.5"/> </box> <textField> <reportElement x="0" y="0" width="60" height="10" style="OrderCountStyle"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Integer">$V{OrderCount}</textFieldExpression> </textField> <textField pattern="MM/dd/yyyy" isBlankWhenNull="true"> <reportElement x="0" y="10" width="60" height="10"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.sql.Timestamp">$V{MaxDate}</textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" rowTotalGroup="CountryRow"> <cellContents backcolor="yellow" mode="Opaque"> <box> <pen lineWidth="1" lineColor="black"/> </box> <textField> <reportElement x="0" y="0" width="60" height="10" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Integer">$V{OrderCount}</textFieldExpression> </textField> <textField pattern="MM/dd/yyyy" isBlankWhenNull="true"> <reportElement x="0" y="10" width="60" height="10" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.sql.Timestamp">$V{MaxDate}</textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" columnTotalGroup="FreightColumn"> <cellContents backcolor="green" mode="Opaque"> <box> <pen lineWidth="1" lineColor="black"/> </box> <textField> <reportElement x="0" y="0" width="60" height="10" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Integer">$V{OrderCount}</textFieldExpression> </textField> <textField pattern="MM/dd/yyyy" isBlankWhenNull="true"> <reportElement x="0" y="10" width="60" height="10" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.sql.Timestamp">$V{MaxDate}</textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="60" height="20" rowTotalGroup="CountryRow" columnTotalGroup="FreightColumn"> <cellContents backcolor="gray" mode="Opaque"> <box> <pen lineWidth="1" lineColor="black"/> </box> <textField> <reportElement x="0" y="0" width="60" height="10" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.Integer">$V{OrderCount}</textFieldExpression> </textField> <textField pattern="MM/dd/yyyy" isBlankWhenNull="true"> <reportElement x="0" y="10" width="60" height="10" style="Sans_Bold"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.sql.Timestamp">$V{MaxDate}</textFieldExpression> </textField> </cellContents> </crosstabCell> </crosstab> </band> </summary></jasperReport>
  5. I have tried adding it as a <argument name="REPORT_LOCALE">fr</argument> But it complains that it is a string and not a java locale Any hints?
  6. I can get js 2.0 to deploy on glassfish v2 beta 3 with this sun-web.xml Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN' 'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'> <sun-web-app> <context-root>/jasperserver</context-root> <session-config> <session-manager/> </session-config> <resource-ref> <res-ref-name>jdbc/jasperserver</res-ref-name> <jndi-name>jdbc/jasperserver</jndi-name> </resource-ref> </sun-web-app> The problem is I use postgresql and postgresql requires that AutoCommit is off for the use of large objects. So after adding an image the application crashes. I have added defaultAutoCommit = false to the conntection pool but it seems to be ignored. I have changed the spring been to bypass using jndi and make a driect connection and it works. ApplicationContext.xml Code:[code] <bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="${metadata.jdbc.driverClassName}" /> <property name="url" value="${metadata.jdbc.url}" /> <property name="username" value="${metadata.jdbc.username}" /> <property name="password" value="${metadata.jdbc.password}" /> <property name="defaultAutoCommit" value="false" /> </bean> Haven't tried it with mysql but I would assume it works.
  7. How did you get js to run with postresql? I can get it 2.0 to run but anytime i go to add a file resource I get a 11:16:08,283 ERROR JSErrorPage_jsp,http-0.0.0.0-8080-1:326 - org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
×
×
  • Create New...