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

glassner

Members
  • Posts

    67
  • 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 glassner

  1. Using JasperReport 3.7.3, with java 1.5 locally, and everything works fine When deploying to my test server then I get the error in question (using the same exact .ear) Anyone has figured out what this error could be ?
  2. I was trying the "table" wizard. ANyone knows whether documentation exists on how to use it ? I cannot print anything with it, yet I think I have set up correctly its dataset ...
  3. My $V{PAGE_NUMBER} prints only on the very first page of my report, but not on the subsequent pages. Yet, the "Print repeated values" is checked. What else ?
  4. Got it. This works for me. Hope somebody finds this useful JRPptxExporter pptExporter = new JRPptxExporter(); pptExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); pptExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, pptReport ); pptExporter.exportReport(); byte[] reportBytes = pptReport.toByteArray(); //Prepare response response.setContentType("application/vnd.ms-powerpoint"); response.setHeader("Content-disposition", "attachment; filename=Report.ppt" ); response.setHeader("Expires", "0"); response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0"); response.setHeader("Pragma", "public"); response.setContentLength(reportBytes.length); //Send Content to Browser response.getOutputStream().write(reportBytes); response.getOutputStream().flush();
  5. This is my code to generate a PdF file, where reportStream is an object of type InputStream representing the .jasper file. I could not find a way to use JasperPrint with JRPptxExporter ... JasperPrint jasperPrint = JasperFillManager.fillReport(reportStream, parameterMap, resultSet); byte[] reportBytes = JasperExportManager.exportReportToPdf(jasperPrint); //Prepare response response.setContentType("application/pdf"); response.setHeader("Content-disposition", "attachment; filename=Report.pdf" ); response.setHeader("Expires", "0"); response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0"); response.setHeader("Pragma", "public"); response.setContentLength(reportBytes.length); //Send Content to Browser response.getOutputStream().write(reportBytes); response.getOutputStream().flush();
  6. I am trying to use the JRPptxExporter from version 3.7.3 Could anyone provide any examples on how to use it and what parameter, if any, should be set ? Thank you !
  7. Solved the issu of the column header not showing on Excel following Teoror suggestion http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=76165 Any plans on allowing JasperReport to facilitate the creation of Excel formulas ?
  8. ANyone could help me figure out why the columnGroup does not show in Excel format ? <columnGroup name="academicDegreeType" height="35" totalPosition="End"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{academicDegreeType}]]></bucketExpression> </bucket> <crosstabColumnHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="50" height="20" backcolor="#CCCCCC"/> <textElement verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{academicDegreeType} == "DOCTORATE" ? "PhD" : $V{academicDegreeType} == "NT MASTER" ? "NT MS" : $V{academicDegreeType} == "MASTER" ? "MS" : $V{academicDegreeType} == "OTHER" ? "Other": $V{academicDegreeType} == "NO DEGREE" ? "Non Degree" : $V{academicDegreeType}]]></textFieldExpression> </textField> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="20" width="25" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="20" width="25" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[P]]></text> </staticText> </cellContents> </crosstabColumnHeader> <crosstabTotalColumnHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="106" height="20" backcolor="#CCCCCC"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[Total Approved]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="78" y="20" width="28" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[ManYears P]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="20" width="25" height="14" forecolor="#000000" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[P]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="20" width="25" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="50" y="20" width="28" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[ManYears A]]></text> </staticText> </cellContents> </crosstabTotalColumnHeader> </columnGroup>
  9. I am also finding other issues when converting to Excel format: The entire header of my crosstab does not appear on my report if I export it in Excel, but it does appear in any other format (say, PDF). I converted the Excel report into XML and then opened it with a text editor: the header of the report is just not there ! As I said, the header appears in any other type of export http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=76165&topid=76234
  10. Yes, I was using data cells. It is not clear whether there is an easy way to create Excel formulas with Jasper especially if we are using crosstabs. If there is a way, please let me know.The documentation on this issue is non-existent.
  11. I tried also with version 3.7.3, and it does not work. ANy help please ?
  12. The entire header of my crosstab does not appear on my report if I export it in Excel, but it does appear in any other format (say, PDF). I converted the Excel report into XML and then opened it with a text editor: the header of the report is just not there ! As I said, the header appears in any other type of export. The crosstab xml is below. Anyone would be kind enough to help in this ? <crosstab> <reportElement style="Crosstab Data Text" positionType="Float" x="14" y="33" width="548" height="67"/> <rowGroup name="courseCategoryCode" width="77"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{courseCategoryCode}]]></bucketExpression> </bucket> <crosstabRowHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="-3" width="77" height="29" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{courseCategoryCode} + " Totals"]]></textFieldExpression> </textField> </cellContents> </crosstabRowHeader> <crosstabTotalRowHeader> <cellContents backcolor="#FFFFFF"/> </crosstabTotalRowHeader> </rowGroup> <columnGroup name="academicDegreeType" height="35" totalPosition="End"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{academicDegreeType}]]></bucketExpression> </bucket> <crosstabColumnHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="50" height="20" backcolor="#CCCCCC"/> <textElement verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{academicDegreeType} == "DOCTORATE" ? "PhD" : $V{academicDegreeType} == "NT MASTER" ? "NT MS" : $V{academicDegreeType} == "MASTER" ? "MS" : $V{academicDegreeType} == "OTHER" ? "Other": $V{academicDegreeType} == "NO DEGREE" ? "Non Degree" : $V{academicDegreeType}]]></textFieldExpression> </textField> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="20" width="25" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="20" width="25" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[P]]></text> </staticText> </cellContents> </crosstabColumnHeader> <crosstabTotalColumnHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="106" height="20" backcolor="#CCCCCC"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[Total Approved]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="78" y="20" width="28" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[ManYears P]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="20" width="25" height="14" forecolor="#000000" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[P]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="20" width="25" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="50" y="20" width="28" height="14" backcolor="#CCCCCC"/> <textElement verticalAlignment="Top"> <font size="7" isBold="true"/> </textElement> <text><![CDATA[ManYears A]]></text> </staticText> </cellContents> </crosstabTotalColumnHeader> </columnGroup> <measure name="ACTUAL_DEGREE_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{actualDegreeQty}]]></measureExpression> </measure> <measure name="PROJECTED_DEGREE_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{projectedDegreeQty}]]></measureExpression> </measure> <measure name="PROJECTED_MANYEARS_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{projectedApprovedManyears}]]></measureExpression> </measure> <measure name="ACTUAL_MANYEARS_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{actualApprovedManyears}]]></measureExpression> </measure> <crosstabCell width="50" height="26"> <cellContents backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="-3" width="25" height="29" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure} == null ? "0" : $V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="-3" width="25" height="29" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_DEGREE_QTYMeasure} == null ? "0" : $V{PROJECTED_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell height="25" rowTotalGroup="courseCategoryCode"> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="106" height="26" columnTotalGroup="academicDegreeType"> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="-3" width="25" height="29" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="-3" width="25" height="29" forecolor="#000000" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="50" y="-3" width="28" height="29" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_MANYEARS_QTYMeasure} == null ? "0" : $V{ACTUAL_MANYEARS_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="78" y="-3" width="28" height="29" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_MANYEARS_QTYMeasure} == null ? "0" : $V{PROJECTED_MANYEARS_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell rowTotalGroup="courseCategoryCode" columnTotalGroup="academicDegreeType"> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> </crosstab> </band> </groupFooter> </group> <group name="CATEGORY SUBTYPE CODE"> <groupExpression><![CDATA[$F{courseCategorySubtypeCode}]]></groupExpression> <groupHeader> <band height="15"/> </groupHeader> <groupFooter> <band height="153"> <crosstab> <reportElement x="14" y="20" width="557" height="96"/> <crosstabDataset> <dataset resetType="Group" resetGroup="CATEGORY SUBTYPE CODE"/> </crosstabDataset> <rowGroup name="courseProgramCode" width="58" totalPosition="End"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{courseProgramCode}]]></bucketExpression> </bucket> <crosstabRowHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="58" height="25"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{courseProgramCode} == null ? "-" : $V{courseProgramCode}]]></textFieldExpression> </textField> </cellContents> </crosstabRowHeader> <crosstabTotalRowHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="121" height="27" backcolor="#CCCCFF"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <text><![CDATA[Total]]></text> </staticText> </cellContents> </crosstabTotalRowHeader> </rowGroup> <rowGroup name="faculty_code" width="63"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{facultyPrepCode}]]></bucketExpression> </bucket> <crosstabRowHeader> <cellContents backcolor="#FFFFFF" mode="Transparent"> <textField> <reportElement style="Crosstab Data Text" mode="Transparent" x="0" y="0" width="63" height="25"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{faculty_code} == null ? "-" : $V{faculty_code}]]></textFieldExpression> </textField> </cellContents> </crosstabRowHeader> <crosstabTotalRowHeader> <cellContents backcolor="#FFFFFF"/> </crosstabTotalRowHeader> </rowGroup> <columnGroup name="academicDegreeType" height="41" totalPosition="End"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{academicDegreeType}]]></bucketExpression> </bucket> <crosstabColumnHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="50" height="20" backcolor="#CCCCCC"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{academicDegreeType} == "DOCTORATE" ? "PhD" : $V{academicDegreeType} == "NT MASTER" ? "NT MS" : $V{academicDegreeType} == "MASTER" ? "MS" : $V{academicDegreeType} == "OTHER" ? "Other": $V{academicDegreeType} == "NO DEGREE" ? "Non Degree" : $V{academicDegreeType}]]></textFieldExpression> </textField> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="21" width="25" height="19" backcolor="#CCCCCC"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="21" width="25" height="19" backcolor="#CCCCCC"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[P]]></text> </staticText> </cellContents> </crosstabColumnHeader> <crosstabTotalColumnHeader> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="120" height="20" backcolor="#CCCCCC"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[Total Approved]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="30" y="21" width="30" height="19" forecolor="#000000" backcolor="#CCCCCC"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[P]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="21" width="30" height="19" backcolor="#CCCCCC"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="60" y="21" width="30" height="19" backcolor="#CCCCCC"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[ManYears A]]></text> </staticText> <staticText> <reportElement style="Crosstab Data Text" mode="Opaque" x="90" y="21" width="30" height="19" backcolor="#CCCCCC"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[ManYears P]]></text> </staticText> </cellContents> </crosstabTotalColumnHeader> </columnGroup> <measure name="ACTUAL_DEGREE_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{actualDegreeQty}]]></measureExpression> </measure> <measure name="PROJECTED_DEGREE_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{projectedDegreeQty}]]></measureExpression> </measure> <measure name="PROJECTED_MANYEARS_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{projectedApprovedManyears}]]></measureExpression> </measure> <measure name="ACTUAL_MANYEARS_QTYMeasure" class="java.math.BigDecimal" calculation="Sum"> <measureExpression><![CDATA[$F{actualApprovedManyears}]]></measureExpression> </measure> <crosstabCell width="50" height="25"> <cellContents> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="25" height="25" backcolor="#CCCCCC"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure} == null ? "0" : $V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="0" width="25" height="25" backcolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_DEGREE_QTYMeasure} == null ? "0" : $V{PROJECTED_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="134" columnTotalGroup="academicDegreeType"> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="30" height="25" backcolor="#CCCCCC"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="30" y="0" width="30" height="25" forecolor="#000000" backcolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="60" y="0" width="30" height="25" backcolor="#CCCCCC"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_MANYEARS_QTYMeasure} == null ? "0" : $V{ACTUAL_MANYEARS_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="90" y="0" width="30" height="25" backcolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_MANYEARS_QTYMeasure} == null ? "0" : $V{PROJECTED_MANYEARS_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="50" height="27" rowTotalGroup="courseProgramCode"> <cellContents backcolor="#FFF3E6" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="25" height="25" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure} == null ? "0" : $V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="25" y="0" width="25" height="25" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_DEGREE_QTYMeasure} == null ? "0" : $V{PROJECTED_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell width="134" height="27" rowTotalGroup="courseProgramCode" columnTotalGroup="academicDegreeType"> <cellContents backcolor="#FFFFFF" mode="Opaque"> <box> <pen lineWidth="0.5" lineStyle="Solid" lineColor="#FFFFFF"/> </box> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="0" y="0" width="30" height="25" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="30" y="0" width="30" height="25" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_DEGREE_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="60" y="0" width="30" height="25" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{ACTUAL_MANYEARS_QTYMeasure}]]></textFieldExpression> </textField> <textField> <reportElement style="Crosstab Data Text" mode="Opaque" x="90" y="0" width="30" height="25" backcolor="#CCCCFF"/> <textElement verticalAlignment="Middle"> <font size="7" isBold="true"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{PROJECTED_MANYEARS_QTYMeasure}]]></textFieldExpression> </textField> </cellContents> </crosstabCell> <crosstabCell rowTotalGroup="faculty_code"> <cellContents/> </crosstabCell> <crosstabCell rowTotalGroup="faculty_code" columnTotalGroup="academicDegreeType"> <cellContents/> </crosstabCell> </crosstab>
  13. returns null ... This is the measure RowCount using the same bucket expression of the group courseProgramCode <measure name="RowCount" class="java.lang.Integer" calculation="DistinctCount"> <measureExpression><![CDATA[$F{courseProgramCode}]]></measureExpression> </measure> <rowGroup name="courseProgramCode" width="58" totalPosition="End"> <bucket> <bucketExpression class="java.lang.String"><![CDATA[$F{courseProgramCode}]]></bucketExpression> </bucket> (...)
  14. Molte grazie, Giulio ! I will certainly post something here if I get an answer that could help others. Grazia
  15. Does anyone know how to generate Excel formula dynamically when using a crosstab ? This post is very helpful in decribing how to generate Execl formulas dynamically in the post above, we set the following property: net.sf.jasperreports.export.xls.formula "=SUM(B2:B"+($V{REPORT_COUNT}.intValue()+1)+")" But in the context of a crosstab, does anyone know how to refer to the number of records in a group, or the number of columns in a group ? How does one replace "B2" with something that indicated the first column, the first row ... Or dynamic Excel formulas and crosstabs do not mix ?
  16. Thank you, Giulio. So, there is not a way of doing it in iReport ?
  17. Still nobody on this ? Could it be I am the only one with this problem ? Please if you know how, let me know. I cannot find anything on this topic in the forum and there is no documentation available
  18. Does anyone know how to generate Excel formula dynamically when using a crosstab ? This post is very helpful in decribing how to generate Execl formulas dynamically http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=74214 in the post above, we set the following property: net.sf.jasperreports.export.xls.formula "=SUM(B2:B"+($V{REPORT_COUNT}.intValue()+1)+")" But in the context of a crosstab, does anyone know how to refer to the number of records in a group, or the number of columns in a group ? How does one replace "B2" with something that indicated the first column, the first row ... Or dynamic Excel formulas and crosstabs do not mix ?
  19. slow Wrote: when you write: SUM(B2:B5) you know that you want sum cells from B2 to B5... writing "SUM(B2:B"+($V{REPORT_COUNT}.intValue()+1)+")" I sum cells from B2 to BN, where N is a number equal to the number of record of the detail band ($V{REPORT_COUNT}) plus one (+1)(the one cell occupied by the column header). (i don't know the N value when i write the report code... so writing that makes the report generic) it' a simple trick create to make your example dinamic... it's not mandatory. Thanks for karma... :) I guess a lot of things for work...so I read the small details... :( Post Edited by slow at 05/11/2010 13:31 How do we apply this to a crosstab context ? How do we replace "B" ? In a crosstab, in fact, we do not know whetehr the formula will end in column B or C or D ... ; also, we want to compute totals in each column ...
×
×
  • Create New...