2002 JI Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: Chuck Deal - cdeal Problem with negative x values 2003-06-17 11:04 OK, I have an example of trying to draw a line using a negative x value that the line won't float. In this example I have a similar line, but drawn using a negative y that DOES float. I tried to find the code that was causing the problem, but I really didn't know where to start. THe following is an XML report design that will cause the error. I have a textfield that stretches. To see the behavior, change the textField to have only one line. Now, you might also wonder why I don't just use the other method I show. It has to do with the other elements that are on my report. So, I really need to be able to specify a negaive x coordinate. Could someone please tell me where to go to make an attempt to fix this little glitch? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="test" pageWidth="625" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="575" leftMargin="25" rightMargin="25" topMargin="25" bottomMargin="25"> <reportFont name="CourierNew" isDefault="true" fontName="Courier New" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Courier" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <group name="Response"> <groupHeader> <band height="275"> <staticText> <reportElement positionType="Float" x="0" y="0" width="150" height="15"/> <textElement> <font reportFont="CourierNew"/> </textElement> <text><![CDATA[Response:]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" x="0" y="15" width="575" height="0"/> <textElement> <font reportFont="CourierNew"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["LINE 1nLINE 2nLINE 3"]]></textFieldExpression> </textField> <rectangle> <reportElement positionType="Float" mode="Transparent" x="90" y="70" width="20" height="20"/> <graphicElement/> </rectangle> <line> <reportElement positionType="Float" x="90" y="70" width="20" height="20"/> <graphicElement/> </line> <line> <reportElement positionType="Float" x="110" y="70" width="-20" height="20"/> <graphicElement/> </line> <rectangle> <reportElement positionType="Float" mode="Transparent" x="300" y="70" width="20" height="20"/> <graphicElement/> </rectangle> <line> <reportElement positionType="Float" x="300" y="70" width="20" height="20"/> <graphicElement/> </line> <line> <reportElement positionType="Float" x="300" y="90" width="20" height="-20"/> <graphicElement/> </line> </band> </groupHeader> </group> </jasperReport> By: Chuck Deal - cdeal RE: Problem with negative x values (correctio 2003-06-17 11:50 Correction: Not negative x values, negative WIDTH values 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