Jump to content
Changes to the Jaspersoft community edition download ×

zol777

Members
  • Posts

    43
  • 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 zol777

  1. If locale problem , i think u should first convert all kurd into UTF-8 (sure if locale are not supported in java , may got a problem to convert it via java) some ref http://stackoverflow.com/questions/30059890/storing-data-mysql-in-kurdish-font or just simply String utf8Str = new String(str.getBytes("UTF-8"),"UTF-8"); If it can be converted into UTf-8 encoding, i think should be displayed in a proper manner if those glyph is available
  2. Assume font extension has been setup in a proper manner Detail http://community.jaspersoft.com/wiki/custom-font-font-extension Let's try net.sf.jasperreports.default.font.name=Arialnet.sf.jasperreports.default.font.size=10net.sf.jasperreports.default.pdf.font.name=Arialnet.sf.jasperreports.default.pdf.encoding=Identity-Hnet.sf.jasperreports.default.pdf.embedded=truewith tag <font fontName="Airal" pdfFontName="Arial" pdfEncoding="Identity-H" isPdfEmbedded="true" size="14" />
  3. As i know Font extension should be one of the solutions . but i don't wanna to changes thousand of report It is kindly suggested to synchornize the behaviour of jdk under my migration thanks
  4. i have a jrxml file use the following tag on AIX 7 <style name="Sans_Normal" isDefault="true" fontName="Times New Roman" fontSize="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/><style name="Sans_Bold" fontName="Times New Roman" fontSize="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/><style name="Sans_Italic" fontName="Times New Roman" fontSize="12" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false"/>....<staticText><reportElement style="Sans_Bold" mode="Opaque" x="6" y="117" width="50" height="19" forecolor="#000000" backcolor="#FFFFFF" uuid="4b3d2665-fc53-4312-9e1f-85a2653e620e"/><box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"><pen lineWidth="0.0"/><topPen lineWidth="0.0"/><leftPen lineWidth="0.0"/><bottomPen lineWidth="0.0"/><rightPen lineWidth="0.0"/></box><textElement textAlignment="Left" verticalAlignment="Middle"><font fontName="Times New Roman" size="8" isBold="false" isUnderline="false"/></textElement><text><![CDATA[----------------------]]></text></staticText>.....2 jdk is used, jdk6 and jdk7 for DEV and SIT env repsectively In JDK 6(under Jboss 710 with jasper server 5.5) , only some of the "-" is displayed in static field . Those "-" unable to display has been truncated In JDK 7(under Jboss 710 with jasper server 5.5) , all "-" are displayed in static field . height of Text field is extended In pdf exported , reference information are shown HelveticaType:type 1Encoding : AnsiActual Font: ArialMTActual Font Type: True Type I have read though some information via google. it seem currently font used in my report should be logical font of jdk. In order to align report in the diff jdk , the following are done but the result are failed 1. replace the jre/lib/fonts/fonts.dir of jdk7 by jdk6 with restarting jboss2. replace the jre/lib/fontconfig.properties of jdk7 by jdk6 with restarting jboss The reason not to overwrite whole directory jre/lib/fonts of jdk7 by jdk6 because checksum of all ttf file are the same . therefore , only repalce the fonts.dir fileIf anyone have idea regarding to align the text field display under 2 diff jdk? please kindly help
  5. here is my requirement: generate a CSV report in jasper server(version 5.5.0) but output file should be ended with .txt I have take a look of the following article /documentation/jasperreports-server-ultimate-guide/v55/adding-custom-export-channels but no idea how to rewrite a output file name. By review source code of jasperreport and found a class called net.sf.jasperreports.engine.export.JRAbstractCsvExporter and actual export a report with custom file name. However it does have a outputstream onlyduring export but without any file name during processing its exportReport method. Does any one has anyidea that i should change those source code of jasper server to fulfill my requirement?
  6. How do you think "html component" is safe to install in jasper server? Since i have not read any official documentation on jrxml for using html component In Jasper studio/iReport , it does support it i am confuse if using html component have any side effect (such as memory leakage , not compatible to other component in jasperserver) in jasper server for your reference , i am using jasperserver v 5.5
  7. Can i just put those jar of html component onto jasperserver (version 5.5) and consider it should contain no problem on running ? i am afraid that installation of html component to jasper server may raise some unexpected behaviour
  8. so would you mind kindly explain why html component has not been bundled into jasper server?
  9. so would marianol or other staff explain why html component has not been bundled into jasper server? Since i am forced to install the html component onto jasperserver (version 5.5) and afraid there is some sort of side effect related to this component i have see some link claims that HTML component is experiment product reference html-component-external-javascript-file-html-export-fails-server-not-ireport-or-ios
  10. In simply , shall i consider the corresponding jar of html component is bug free package to be installed on jasper server?
  11. if any one of jasper server staffs can answer me that why html component does not supported in jasper server directly? i have read those post that developer need to put certain jar in jasper server for supporting it is running in jasper server? BTW, if any one can provide some official documentation on html component? and if html component is still in experiment stage per the following link shown html-component-external-javascript-file-html-export-fails-server-not-ireport-or-ios In simply if i can consider html component is safe to use in jasper server? thank
  12. my jasperserver version :5.5.0 i have follow above some web tutorial to embedded the ttf file for jasper server . it works but if i wanna to embedded the ttc file , it is not ok . it is amazing for me . since i have embedded the ttc file with jasper report api by using the follow syntax pdfFontName="c:/a.ttc,1" Furthermore , i have try to use otf file . but it always return the following error Font 'NotoTChinese' is not available to the JVM. even i have placced the OTF font file in the correction location of jasperreports-fonts-5.0.0.jar so should i confirm that otf and ttc are not supported jasper server Furthermore , i have found not all ttf can be embedded in pdf for jasper server. can someone provide the hints on detemining which feature of TTF indicated it can be embedded in PDF via jasper server? my test case : ArialUT.ttf bundled in window 7 are ok to show all character with HKSCS encoding
  13. i m new to jasper server . and if any one can tell me how to customize the quartz schedule for persistance the schedule submitted by web service in jasper server? since i can submitted a report generation request by adhoc schedule . after generation , the job is disappear and found the file has been generated which cannot be cross check by program if a job is done successfully or failed
  14. in both jdk 1.4 and jdk 1.6 , the following jrxml can be displayed in a proper manner <textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="60" y="185" width="190" height="10" key="DISPLAY_SEQ_H" positionType="FixRelativeToBottom"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="3" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font reportFont="Arial_7" size="8"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[]]></textFieldExpression> </textField>the following jrxml is shown in a proper manner in jdk1.4 but not jdk 1.6 <textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="60" y="195" width="190" height="8" key="DISPLAY_SEQ_H-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font reportFont="Arial_7" size="8"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["XXX:"+$P{REF_NBR}]]></textFieldExpression> </textField>the most obivous difference is the height label only . if i wanna synchronize the behaviour of jasper report. anyone have any idea ?
  15. Recently i have encountered a problem on display font in jdk 1.4 and jdk 1.6 under RedHat environment Some of font cannot be displayed in jdk 1.6 environment. after reading those thread here , i have resolved the problem in the following steps 1) tar the folder of /usr/share/fonts/msttcorefonts in old machine using jdk 1.4 2) untar the files in new machine using jdk 1.6 's folder /opt/ibm-java-x86_64-60/jre/lib/fonts 3) execute the following command as root under /opt/ibm-java-x86_64-60/jre/lib/fonts in new machine jdk1.6 sudo mkfontscale sudo mkfontdir sudo fc-cache -f -v after doing above steps , some font become visble but some font still invisible( it can be visible after extending text box height but it does not suggested to do so . since over 1000 jrxml is need to revamp) here is the font i use for your references <reportFont name="Arial_7" isDefault="false" fontName="Arial" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="/mnt/san/COMMON/res/mingliu.ttc,1" pdfEncoding="Identity-H" isPdfEmbedded="true"/>here is the text box jrxml for your references <reportFont name="Arial_7" isDefault="false" fontName="Arial" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="/mnt/san/COMMON/res/mingliu.ttc,1" pdfEncoding="Identity-H" isPdfEmbedded="true"/>does anyone has encounter the similar problem? if the problem is realted to jre , OS or jasper report library? Can any one give some idea on resolving this problem
  16. any one having idea? May i conclude my problem is not feasible in the latest jasper library?
  17. i would like to create a pdf report as follow /uploads/projects/jasperreports/template.jpg a. In the columnHeader and columnFooter, they are "rounded" rectangle for showing field name and total respectively. b. In the detail section, its length is floating which depend on how many items are included I have tried to use tag <rectangle> , but it cannot allow to across two or more sections. If i draw a rectangle at background, it is hard to estimate length of rectangle becuase content to display in detail section is not fixed. Furthermore, it seem have no tag for drawing arc in jrxml , right? If the pdf report is not "rounded" rectangle as above shown , i still draw it line by line . In order to achieve above design , can anyone give me some hints/idea ? Thanks Post Edited by zol777 at 02/11/2010 07:25
  18. ok now. since my jasper report is too old (version 1.3.3). I can't adopting your suggestion directly due to setJasperPrint() method does not existed in old JRPdfExporter . The basic concept is idenitcal to your suggested approach. By extending JRPdfExporter, i override method exportReportToStream(). In batch exporting mode, loadedImageMap do not clear itself during exporting report one by one. One of the side effect is my exporting PDF cannot contain any javascript (fortunately, my pdf does not require javascript). pdfJavascipt is one of the private properties of JRPdfExporter whereas it does not allwoed to alter in my class (subclass of JRPdfExporter). Hereby i attach my code for other who encounter similar problem to references Thanks for your kindly support! Code: Post Edited by zol777 at 09/24/2009 02:02 Post Edited by zol777 at 09/24/2009 02:07
  19. With your kindly suggestion, it is workable for producing a large PDF file by using JasperPrint.addPage(JRPrintPage jp) to add the individual jasperPrint file page by page. However , the caching concept is failed for producing in batch mode. Would you mind suggest direction/method for using image caching exporting pdf in batch mode? For your investagiation, hereby i attach my testing material as testing.zip . here is those details CacheImageRenderer.java -> updated version of your program. since i change those private property/method to protected property/method respectively TestImageCache.java-> my testing program . I have add some comment in code section of this discussion thread test.jpg , test.jrxml, test.jasper -> testing image , testing jrxml and testing jasper file ok.pdf -> final result with one large jasper print object and image cache notok.pdf -> final result by production one large pdf in batch mode Thanks Code:import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JRExporterParameter;import net.sf.jasperreports.engine.JRImageRenderer;import net.sf.jasperreports.engine.JRPrintPage;import net.sf.jasperreports.engine.JRRenderable;import net.sf.jasperreports.engine.JasperExportManager;import net.sf.jasperreports.engine.JasperFillManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.engine.JasperReport;import net.sf.jasperreports.engine.export.JRPdfExporter;import net.sf.jasperreports.engine.util.JRLoader;import net.sf.jasperreports.engine.util.JRSaver;public class TestImageCache { protected JRImageRenderer image1; protected JRRenderable initImage1() throws JRException { return new CachedImageRenderer("C:\\test.jpg"); } public JasperPrint prepareJasperPrint() throws JRException { Map map = new HashMap(); map.put("Image1", initImage1()); return JasperFillManager.fillReport( (JasperReport) JRLoader.loadObject("C:\\test.jasper"), map); } public static void prepareSerializeObject() throws Exception { TestImageCache test = new TestImageCache(); for (int i = 0; i < 20; i++) { JRSaver.saveObject( test.prepareJasperPrint(), "C:\\" + i + ".jasper"); } } public static void main(String[] args) { try {//prepare 20 serialized jasperprint objects for testing prepareSerializeObject(); TestImageCache test = new TestImageCache(); List list = new ArrayList();//prepare the large jasper print object JasperPrint jp = new JasperPrint(); jp.setPageHeight(842); jp.setPageWidth(540); jp.setOrientation(Byte.parseByte("1")); for (int i = 0; i < 20; i++) { JasperPrint currJp = (JasperPrint) JRLoader.loadObject("C:\\" + i + ".jasper"); for (int j = 0; j < currJp.getPages().size(); j++) { jp.addPage((JRPrintPage) currJp.getPages().get(j)); } list.add(currJp); }//it can reuse this image in this large jasper //print JasperExportManager.exportReportToPdfFile(jp, "C:\\ok.pdf");//however in batch mode , JasperPrint cannot support those //"cacheing" image JRPdfExporter exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, list); exporter.setParameter( JRExporterParameter.OUTPUT_FILE_NAME, "C:\\notok.pdf"); exporter.exportReport(); System.out.println("Fin"); } catch (Exception e) { e.printStackTrace(); } }}
  20. i am still suffering from the problem!Can any one give more hints on handling this problem Thanks
  21. I have a few points would like to clarify 1. Is custom image renderer = subClass of JRImageRenderer? 2. Is readResolve() one of the methods declared in JRImageRenderer/or its interface ? since i decompile the JRImageRenderer , i can't find it. 3. Is readResolve() is called in PDF exporting of jasper report? so it further tell the exporter to use image store instead of reading it again? 4. if i use my custom ImageRenderer, how can other components in jasper know should use my ImageRenderer instead of default ImageRenderer? just declaring it in the jrxml is ok? 5. can you give me some brief idea/pseudo code on writing readResolve()? by using "key" attribute or physical file name to identify the incoming image is existed or not? Thanks
  22. my case is a little bit complex since i has 4 computers to generate a report to a customer. before exporting a pdf, jasperprint object is serialized. (let's day if i have 2000 customer, then 2000 individualjasperprint serialized object are existed) after 4 computer has completed their job, one of them is selected to consolidate them into batch jasper print by deserialize them. With your recommendation , is it still applicable to my case? or i should process image processing during consolidation? (which is difficult in my current business logic) Thanks
  23. With your kindly recommendation , it is ok to export those jasperPrint object, around 3000 jasperPrint objects, via batch mode into a single pdf file (1.8g large). Thanks But i would like to ask if some of my jasper print objects conatin duplicate images. Any ideas to reduce the output pdf files size by point those different references to the same reference? Best regards, Keung
  24. Hi sergeleo I think you misunderstand my problem. Since my program is ok for filling report with/without JRVirtualizer. The outofMemory exception is came when exporting jasperprint to PDF. Thanks Post Edited by zol777 at 09/07/2009 03:09
  25. I have a urgent need for exporting a 1g pdf but got out of memory error in the following code JRExportManager.exportReportToPdfFile(hugeJasperPrint, "c:\a.pdf"); After tuning Java VM argument as follow, the exporting problem is still existed. (this is the maximium limit for me to use) -Xms 256m, -Xmx2048m After reading some article on web , i has try to use JRVirtualizer like JRSwapFileVirtualizer and JRGZipFileVirtualizer. But they seem make help on filling report but not export Report (am i understand right?). so same problem occur? Lastly, i have export hugejasperprint as part1 and part2 FileOutputStream fos = new FileOutputStream(new File("C:\a.pdf"),true); JRExportManager.exportReportToPdfStream(part1, fos); JRExportManager.exportReportToPdfStream(part2, fos); But it does show part2's content in a.pdf only. Does anyone has got the similar problem on exporting(not filling) a huge pdf like me? If you have any idea to my problem , please help to let me know too. Thanks Post Edited by zol777 at 09/04/2009 08:33
×
×
  • Create New...