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

tinti

Members
  • Posts

    18
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by tinti

  1. I've done some tests and aparently the problem is with the stretch propertie. When i set the detail2 height to 0 and put a subreport (the element, not the report) in there with height 0, the preview of the report goes crazy and print the footer with the wrong informations. But, if i set the detail band with the size of the subreport (the sum of all details on the Subreport.jrxml), and i set the size of the element subreport with the same value, it works.
  2. I have a report with one subreport. Something like this. MasterReport.jrxml SQL > select name from user =Header TextField > name =Detail1 Subreport > Subreport.jrxml =Detail2 pageBreak =Footer TextField > name Use for reference this table as a result from the MasterReport select. NAME -------- Darth Vader Yoda Johnny B Good And now the Subreport.jrxml SQL > select 1 from dual =Detail Empty space or a Static Field, whatever. So, the problem is that the user name, wich should apear on header and footer is diferent for each page and aparently the problem is about the pagebreak and the subreport. I've done some tests with the MasterReport without the subreport, but with a pagebreak at the end of the detail band and the report printed normaly. But with the other detail and the pagebreak, the report goes crazy and print something like this. Page1 =Header Darth Vader =Detail =Footer Yoda Page2 =Header Yoda =Detail =Footer Johnny B Good Page3 =Header Johnny B Good =Detail =Footer Johnny B Good The data is wrong on the footers of all pages. It should be the same as the header, but it is not printing that way. Am i doing something wrong? Att, Angelo Tinti
  3. Morning, I have the following problem in my reports.One jrxml file with a SQL and their fields mapped. My detail band needs a title line in the report, so i've created a group with a groupHeader in it.This groupHeader haver a textField with my title "Title", and a printWhebExpression. It will print just when some random field of my sql will be not null. Like that: <printWhenExpression><![CDATA[$F{MY_FIELD} != null]]></printWhenExpression> The problems is that, my SQL dont have values to the fields that i'm looking for, but theres a registry on that line. Something like that: select my_field, field2from my_tablewhere field3 = 'value'and field4 is not null The my_field and field2 dont have values, so, they will be null.But, my condition in the "where" section, get me on registry line, as i said. So, my detail will print, but my groupHeader not.I need to force the groupHeader to print. I tried to do a small change on my SQL, doing something like that: select alias.*, 1 conditionfrom ( select my_field, field2 from my_table where field3 = 'value' and field4 is not null ) alias And then, i changed the expression to: <printWhenExpression><![CDATA[$F{CONDITION}.intValue() == 1]]></printWhenExpression> And it solved my problem, but now, sometimes i got the following error: java.sql.SQLException: Stream has already been closed http://www.razorsql.com/docs/support_oracle_long.html Can someone give a help with this.
  4. I have a report that prints differents texts from a database. Those texts pass by a java method that "transform" the text to the final PDF. My problem is that the printed text at Textfield, with HTML marktup setted, cuts words on half. It should be like this: "Some example" but it appears like: "Some exam ple" The catch is that my text have different fonts. Could be one font per word, or per phrase. I searched the forum trying to find something but i got confused with this issue.
  5. OK, so, i need to put the ttf files in a jar, and load to classpath. And use just the font name? I do not need to map the font name anywhere? Like the samples in the jasperreports-3.7.6-project? Edit: My last post is a different project from the first post. I'm not using nothing i showed from the first post. My project from the first post just not work, so i did another project, from my last post, and then the fonts problem was solved, but the accentuation dont worked. Post Edited by tinti at 01/06/2011 16:30
  6. I tried to use that way. JRXML <?xml version="1.0" encoding="ISO-8859-2"?> <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="ReportBase02" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.callouts" value="##Tue Jan 04 09:23:21 BRST 2011"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[select 1 from dual]]> </queryString> <detail> <band height="134" splitType="Stretch"> <textField> <reportElement x="0" y="0" width="555" height="33"/> <textElement> <font size="20" pdfFontName="Base02" isPdfEmbedded="true" pdfEncoding="ISO-8859-1"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Do or do not, there is no try"]]></textFieldExpression> </textField> <textField> <reportElement x="0" y="113" width="555" height="21"/> <textElement> <font size="12" pdfFontName="Base02" isPdfEmbedded="true" pdfEncoding="ISO-8859-1"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["A morte de uma pessoa é tragédia, a de milhões é estatística"]]></textFieldExpression> </textField> </band> </detail> </jasperReport> jasperreports.properties net.sf.jasperreports.export.pdf.font.Base02=/fonts/cour.ttf I exported to pdf, and the pdf is ok. But, i'm working with Portuguese/Brazil, and the accentuation don't worked. What is wrong?
  7. Well, I have a project to print reports using jasper. I need to print various reports with different fonts. Then, I mapped my project with some fonts and his respective tff files. I have at the moment this: In the source package the jasperreports_extensions.properties file with the following items: net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory net.sf.jasperreports.extension.fonts.spring.beans.resource=fonts/fonts.xml And the fonts folder with the tff files and the fonts.xml. The fonts.xml has the following code: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> <bean id="arial" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily"> <property name="name" value="Arial"/> <property name="normal" value="arial.ttf"/> <property name="bold" value="arialbd.ttf"/> <property name="italic" value="ariali.ttf"/> <property name="boldItalic" value="arialbi.ttf"/> <property name="pdfEncoding" value="Cp1252"/> <property name="pdfEmbedded" value="true"/> </bean> <bean id="times" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily"> <property name="name" value="Times New Roman"/> <property name="normal" value="times.ttf"/> <property name="bold" value="timesbd.ttf"/> <property name="italic" value="timesi.ttf"/> <property name="boldItalic" value="timesbi.ttf"/> <property name="pdfEncoding" value="Cp1252"/> <property name="pdfEmbedded" value="true"/> </bean> <bean id="verdana" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily"> <property name="name" value="Verdana"/> <property name="normal" value="verdana.ttf"/> <property name="bold" value="verdanab.ttf"/> <property name="italic" value="verdanai.ttf"/> <property name="boldItalic" value="verdanaz.ttf"/> <property name="pdfEncoding" value="Cp1252"/> <property name="pdfEmbedded" value="true"/> </bean> <bean id="tahoma" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily"> <property name="name" value="Tahoma"/> <property name="normal" value="tahoma.ttf"/> <property name="bold" value="tahomabd.ttf"/> <property name="pdfEncoding" value="Cp1252"/> <property name="pdfEmbedded" value="true"/> </bean> <bean id="Courier New" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily"> <property name="name" value="Courier New"/> <property name="normal" value="cour.ttf"/> <property name="bold" value="courbd.ttf"/> <property name="italic" value="couri.ttf"/> <property name="boldItalic" value="courbi.ttf"/> <property name="pdfEncoding" value="Cp1252"/> <property name="pdfEmbedded" value="true"/> </bean> </beans> And then, I have a report with a textField font property set to "Courier New". My generated PDF show the text in the textField with Arial, not the "Courier New" font. That's my problem. Post Edited by tinti at 12/14/2010 12:45
  8. What i have to do to log the sql execution of my Reports? I'm not using JasperServer. Att, AngeloTinti
  9. Well, I have a report that prints some text from a database. The field where the text is displayed, is scaled according to the text. But this is done behind the scenes, by the JasperReports. My text has multiple alignments, however, the JasperReports only takes into account the alignment of the field itself. For example, if my text is centered lines, but the text field is set to right alignment with the entire text will be aligned right. I have read here on the forum that behave this is normal, then i had to find a solution. I'll modify the object JasperPrint and divide the field where the text appears in various fields. I will create a new field for each block of text alignment, and then set the correct alignment for that particular block. My problem is that I'm using html markup for the field, but when I get the text of JRTemplatePrintText, he returns the text in styledText. How will I know the exact size of each new block of text? Sorry for my English, I'm using GoogleTranslator. >_<
  10. I have a band that iterates over the records of a particular table. The report should print the value of a table field, for example, the user name. The user name field of the table, can bring value containing the following: #BOLD#Sample1 #ITALIC#Sample2 #UNDERLINE#Sample3 According to the value that comes from the field, should I format the text on the label in a different way. For that I need to change the formatting of the label in each iteration of the band. Is it possible?
  11. I have a textField with markup set to html and a code like this: <html> <body> <font style="text-align: center">Test</font> </body> </html> Why this line doesn't stays centered on my report?
  12. I'm using a text field in my report. I'm using styled text in it. I have a tag with style backcolor which runs about 3 lines of text. In iReport, when I view my template, the highlight of the line is shown correctly, as follows in the image below. http://i50.tinypic.com/206h0ll.jpg But when I generate a PDF report, the lines are spaced an odd one. The next image below. http://i50.tinypic.com/2qmgs43.jpg My text field with line spacing is set to single. What can this be? Post Edited by tinti at 12/17/2009 12:17 Post Edited by tinti at 12/18/2009 19:13
  13. I have a report with a TextField with markup set to "html". In this TextField, I have an HTML code with tags like <b> or <i>, where words should appear in Bold or Italic. Viewing the report by iReport, the formatting of words appear correctly. The problem is when I export the report to PDF. The exported report does not present the formatting of HTML code. Someone help me, urgent. Thanks in advance, and sorry for my English. I am using a translator.
×
×
  • Create New...