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

antprochazka

Members
  • Posts

    5
  • Joined

  • Last visited

antprochazka's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Does anybody know whether it is able to configure the report to not allow generating next page when content overflows only with empty space? This case can easily be simulated by taking my code and setting isIgnorePagination="false".
  2. Set isIgnorePagination to "false" is not the optimal solution for me because I am generating electronically signable documents where it is more suitable to have one page stretched (by CONTENT, no empty space) than having two pages.
  3. Can you provide an edited code please? I tried to adequately expand columnFooter or pageFooter to accomodate the visual format for single-line textfield but the result (with 18 <br>s) was not A4 format but undesired long page. It ended up the same as with the code I provided.
  4. This is the option I am currently using. The problem is that when the variable holds only a few lines of text the result pdf is too short and looks like this: which is all right for printing but on the screen it does not look like A4 which is wrong.
  5. Hello all. I am struggling with overflowing document. In my usecase I have a report with textfield showing input text parameter that can be generally multiple lines. What I want: 1) The document to be fix size of A4 unless the content overflows. 2) When the input parameter generates more lines than can fit into one A4 page then stretch the page to become taller. For the sake of simplicity I have set fix content into my textfield (not using the input parameter). To simulate multiline input parameter value currently it consists of "a" followed by 18 newlines (<br>) and letter "b" at the end. <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.9.0.final using JasperReports Library version 6.9.0-cb8f9004be492ccc537180b49c026951f4220bf3 --><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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true" uuid="315a7b0d-5c86-4525-85d8-b2ceba19bbf4"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <queryString> <![CDATA[]]> </queryString> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="486"> <textField isStretchWithOverflow="true"> <reportElement x="0" y="0" width="10" height="12" uuid="8270fbc3-5b36-4f0d-976d-9ad192e8ef68"/> <textElement markup="html"> <font size="12"/> </textElement> <textFieldExpression><![CDATA["a<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>b"]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>[/code]Current (undesired) output: Desired output: Acceptable solutions for me: 1) Shrink the page height always to max(real content height, A4 height). I absolutely do not want the page to stretch by empty space. 2) Set isIgnorePagination to "false" and generate 2nd page with overflowing content when there is not enough space on the first page. If I try it now it generates 2nd EMPTY A4 page which is definitely not what I want. Still this is worse solution because I am generating electronically signable documents where it is more suitable to have one page stretched (by CONTENT, no empty space) than have two pages. Thank you very much for your answers guys. I have been looking for solving my problem for a long time but I still have not found sufficient answer.
×
×
  • Create New...