Jump to content

pacoabato

Members
  • Posts

    8
  • Joined

  • Last visited

pacoabato's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. This seems to work for pdf exported documents, but fails for docx ones: JRBasePrintEllipse elipse = new JRBasePrintEllipse(jasperPrint.getDefaultStyleProvider());elipse.setBackcolor(Color.RED);elipse.setForecolor(Color.RED);elipse.setX(50);elipse.setY(50);elipse.setWidth(10);elipse.setHeight(10);elipse.setFill(FillEnum.SOLID);jasperPrint.getPages().get(0).addElement(elipse);[/code]
  2. Hello, I'm generating a report and exporting it to MS Word format (programatically). The report has an image and I want to draw points (as indenpendent objects, not really drawn in the image) over the image that can later be selected and moved using MS Word application. Is it possible to add point or rectangle elements to the report to achieve my target? Thank you very much.
  3. I'm using Jaspersoft Studio 5.6. Below I append an example jrxml file that consists of three texts with different sizes. It displays correctly in Jaspersoft Studio in Design view. In Preview view it is also correctly displayed (using java or pdf). When I execute the report from my Java application the three texts are displayed at the same size. I noticed that Bold and Italic works fine but if I change the font type (DejaVu, Arial, Times new roman, etc) that is also ignored. In the report generated by my application I always get the same font. I'm generating the report this way: //inStream is an InputStream from the .jasper fileJasperRunManager.runReportToPdfStream(inStream, outStream, params, datasource);[/code]If I generate the report this other way I get the texts with the correct sizes but the font type continues to fail: JasperReport jasperReport = JasperCompileManager.compileReport("my/report.jrxml");JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, datasource);JasperExportManager.exportReportToPdfStream(jasperPrint, outStream);[/code]Both JSS and my java application are on the same Windows machine (so the fonts must be available to both). The example jrxml file: <?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="subinforme_pag_1" pageWidth="802" pageHeight="552" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="c6f5d08f-f28b-4c77-8523-5cf4746cdcf2"> <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <queryString language="SQL"> <![CDATA[]]> </queryString> <background> <band height="40" splitType="Stretch"/> </background> <title> <band splitType="Stretch"/> </title> <pageHeader> <band splitType="Stretch"/> </pageHeader> <columnHeader> <band splitType="Stretch"/> </columnHeader> <detail> <band height="551" splitType="Stretch"> <textField> <reportElement x="0" y="80" width="180" height="40" uuid="50721cba-c082-47de-9abf-effcf1b784dd"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="SansSerif" size="4"/> </textElement> <textFieldExpression><![CDATA["Text Field (size 4)"]]></textFieldExpression> </textField> <textField> <reportElement x="0" y="0" width="180" height="40" uuid="05c5129f-f29e-47a1-ad82-4547b51e3d56"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="SansSerif" size="16"/> </textElement> <textFieldExpression><![CDATA["Text Field (Size 16)"]]></textFieldExpression> </textField> <staticText> <reportElement x="0" y="40" width="180" height="40" uuid="5c69d29b-b168-408d-89aa-c6d527f0cae1"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[$V{REPORT_COUNT} == 1]]></printWhenExpression> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="SansSerif" size="8" isBold="false"/> </textElement> <text><![CDATA[static Text (Size 8)]]></text> </staticText> </band> </detail> <columnFooter> <band splitType="Stretch"/> </columnFooter> <pageFooter> <band splitType="Stretch"/> </pageFooter> <summary> <band splitType="Stretch"/> </summary></jasperReport>[/code]
  4. Thanks for your answer. I think Local Anchor only works for pdf files. I want a .txt or .odt file (which is pointed in my pdf file by a hyperlink) to be opened into the text editor. And so on with any file type registered in the operating system.
  5. Hello, I generate a PDF file with hyperlinks pointing to local files. This files are all of them (.txt, .pdf, .log, etc) opened in the web browser when clicked. Is there any option to open this files in the default system application linked to their extension? i.e. if I click on a hyperlink to a txt file I want this file to be opened in the text editor instead of the web browser. I'm using iReport 4.1.2 and jasperreports-4.1.2. The hyperlinks are created with "Reference" hyperlink type and no other option set. Thank you all.
×
×
  • Create New...