sirius.cybernetics Posted May 9, 2014 Share Posted May 9, 2014 I have a CSV for a data source, the fields show in the left hand side (JasperSoft Studio), but I have nothing in my report at all, it's blank except for a static text string and a rectangle. If I press preview it generates thousands of pages (I have a lot of entries in my csv)... but WHY?! It's driving me nuts! Link to comment Share on other sites More sharing options...
sirius.cybernetics Posted May 9, 2014 Author Share Posted May 9, 2014 Here is my page so far: ..insert your code here..<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version last--><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="BR_Sample" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="51a3c8c7-d06f-42a4-8483-f4ded8182f42"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="CSV Data"/> <queryString> <![CDATA[]]> </queryString> <field name="File Size" class="java.lang.Integer"/> <field name="Duplicate" class="java.lang.Integer"/> <variable name="Total DB Size" class="java.lang.Integer" resetType="None" calculation="Sum"> <variableExpression><![CDATA[$F{File Size}]]></variableExpression> </variable> <background> <band splitType="Stretch"/> </background> <title> <band height="80" splitType="Stretch"> <staticText> <reportElement key="" x="0" y="0" width="554" height="50" uuid="9437da8d-5530-423d-b03f-9f138414ad55"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="SansSerif" size="26" isBold="true"/> </textElement> <text><![CDATA[My Company]]></text> </staticText> <staticText> <reportElement x="0" y="50" width="554" height="29" uuid="3c59cfb8-2cc2-4cd7-9dc6-f9a2331402e8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="16"/> </textElement> <text><![CDATA[Aggregated File Summary]]></text> </staticText> <image> <reportElement x="90" y="0" width="50" height="50" uuid="84b61705-aed8-4f21-b344-8aa3cd5871c8"/> <imageExpression><![CDATA["C:/Users/Admin/Google Drive/BIS/MyLogo.jpg"]]></imageExpression> </image> </band> </title> <pageHeader> <band height="20" splitType="Stretch"> <rectangle> <reportElement x="0" y="0" width="554" height="20" uuid="9fb9330f-45be-495b-9b4e-12397ff0ae5a"/> </rectangle> </band> </pageHeader> <columnHeader> <band splitType="Stretch"/> </columnHeader> <detail> <band height="169" splitType="Stretch"/> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"> <textField evaluationTime="Report"> <reportElement x="480" y="24" width="70" height="30" uuid="da64e3b2-efd4-4c21-9b2f-c120c4569b90"/> <textElement textAlignment="Left"/> <textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField> <reportElement x="410" y="24" width="70" height="30" uuid="ad4241fe-95dc-4a3a-8495-e8052e5e2504"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="17" splitType="Stretch"/> </summary></jasperReport>[/code] Link to comment Share on other sites More sharing options...
Solution ybablyuk Posted May 9, 2014 Solution Share Posted May 9, 2014 Hello,As i see you have big details band, this band will repeat for every record in your dataset.For resolve this issue you need change detail band height to 0, or remove it. <detail> <band height="0" splitType="Stretch"/> </detail>[/code] Link to comment Share on other sites More sharing options...
sirius.cybernetics Posted May 9, 2014 Author Share Posted May 9, 2014 That worked, but now where am I supposed to place my report data? :/ Link to comment Share on other sites More sharing options...
ybablyuk Posted May 9, 2014 Share Posted May 9, 2014 Ok, when you put in your detail band fields you will not have empty pages, you will have pages with your dataNote detail band height should be not very big (usual it same as field height), in other case you will have empty spaice after every rows. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now