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

padmav

Members
  • Posts

    14
  • Joined

  • Last visited

padmav's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. BTW, just to mention I am using Jasper Reports 3.5.1 release in our product. I looked at fonts example that came with the samples and I am trying to configure fonts.xml Thanks, Padma Post Edited by padmav at 04/19/2010 23:51
  2. Hi, I am working on packing fonts along with our product for jasper reports purpose. I looked at the fonts example. I found that I need to supply ttf files as part of fonts.xml. Our product runs on linux. So, I am wondering if this fonts.xml contain only files with .ttf file extension (or) it takes any files with .pfa and .amf file extension? I am wondering if Jasper Reports fonts.xml supports fonts other than true type fonts? Thanks, Padma
  3. Hi, I have the following textField element in my jasper report template. I would like to add an icon to the text filed. In my case, when $F{VolumeChange}.longValue() < 0, then I would like to add an up_arrow.jpg that should be shown together with the textFieldExpression like the following. If I put the image as part of the textFiledExpression it is giving error. Can you please let me know if there is there a way to do this? ---------- <textField isStretchWithOverflow="true"> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="95" y="0" width="70" height="15" forecolor="#CC0033"> <printWhenExpression><![CDATA[new Boolean($F{VolumeChange}.longValue() < 0)]]></printWhenExpression> </reportElement> <box leftPadding="10" rightPadding="10"/> <textElement textAlignment="Right"> <font size="8" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["-" + Math.abs($F{VolumeChange}.longValue()) + " (" + $F{VolumeChangePercent} + ")"]]></textFieldExpression> </textField> -------- Image I would like to add is up_arrow.jpg : ![CDATA[ <image scaleImage=Clip"> <reportElement x="95" y="0" width="10" height="15" isRemoveLineWhenBlank="true"/> <imageExpression class="java.lang.String"><![CDATA["../images/up_arrow.jpg]]></imageExpression> </image> ]] ---- Thanks, Padma
  4. Hi, I have a report template title band containing textField reportEelement with lengthy text. When the length of text exceeds one line (reportElement width), the text completely disappears. Example of text to be shown: 3m-image-lm, ICMP, TCP 1024-10K, TCP 10K-32K, TCP 32K-64K, TCP/135, UDP 1024-10K, UDP 32K-64K, UDP/514, aairnet-1, ace-client, adobeserver-1, ads, altav-tunnel, ..........etc., I am using isStretchWithOverflow="true", strechType = ="RelativeToTallestObject", poistionType="Float" for the element. I am not sure if any thing else need to be done here. Part of source of Title band from Report Template file: The textfield containing 'leftHandFilterString' shown below gives problem when displaying the text. <title> <band height="140"> .... .... ...................... ......................... <textField isStretchWithOverflow="true" evaluationTime="Now" isBlankWhenNull="true"> <reportElement key="leftHandFilterString" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="120" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Additional Filter: " + $P{leftHandFilterString}]]></textFieldExpression> </textField> </band> </title> Thanks, Padma
  5. Hi, I am trying to use JRCsvExporter to open the csv file in IE browser using the following: response.setHeader("Content-type", "application/csv"); response.setHeader("Content-disposition", "inline; filename=\"" + fileName + "\".csv;"); OutputStream ouputStream = response.getOutputStream(); JRCsvExporter exporter = new JRCsvExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream); exporter.exportReport(); In case of PDF, it oens with in the browser. But how do I make the csv file open with in the browser. Is there a way to open the file in browser? I tried using 'text/plain', with extenstion .txt, but if I try with extenstion .csv, the text file does not open in browser. Can you please let me know what is the appropriate MIME type to open csv file within browser. Thanks, Padma
  6. I am looking for a similar requirement where I want to view my csv first with in the browser window before saving using the file system dialog. Is there a way to acheive this? Thanks, Padma
  7. Teodor, Thank you very much. That works well. Padma
  8. Hi svenn, Thnak you for your reply. I am new to Jasper Reports. Can you please let me know how do I write expression to remove the page header for the first page. Following is the page header that I will be using. ------------------------------- <pageHeader> <band height="60"> <image scaleImage="Clip"> <reportElement x="0" y="0" width="247" height="60" isRemoveLineWhenBlank="true"/> <imageExpression class="java.lang.String"><![CDATA["../images/logo.png"]]></imageExpression> </image> </band> </pageHeader> ---------------- Thanks, Padma
  9. Hi, I need to show a page header on all of the pages on the report containing product logo. So, on the first page page header should show above the title. Can you please let me know hwo do I achive this. But, when I am creating a template, if I put the page header above the title, the report template does not compile. In the following code, if I put the page header below the title, in the first page also, it appears below the title. But I want the page header to be above the title in the first page. ----------------------------------- <title> <band height="180"> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="20" width="515" height="40" isRemoveLineWhenBlank="true"/> <box> <topPen lineWidth="1.0"/> </box> <textElement textAlignment="Center"> <font size="16" isBold="true" pdfFontName="Helvetica-Bold"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{reportTitle}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement style="Sans_Bold" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="60" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10" isBold="true" pdfFontName="Helvetica-Bold"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Filters Applied:"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement key="dataSource" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="80" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{dataSource}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement key="timeFrame" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="100" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{timeFrame}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement key="searchFilter" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="120" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Source: " + $P{source}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement key="searchFilter" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="140" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Application: " + $P{application}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement key="searchFilter" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="160" width="515" height="20" isRemoveLineWhenBlank="true"/> <textElement textAlignment="Left"> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Destination:" + $P{destination}]]></textFieldExpression> </textField> </band> </title> <pageHeader> <band height="60"> <image scaleImage="Clip"> <reportElement x="0" y="0" width="247" height="60" isRemoveLineWhenBlank="true"/> <imageExpression class="java.lang.String"><![CDATA["../images/logo_mcafee_profiler.png"]]></imageExpression> </image> </band> </pageHeader> --------- Thanks, Padma
  10. Serge, I found the issue. Earlier, I put these properties in the wrong location. After putting the properties, in the right location, below the first line in Jasper reports template, it started working now. Thank you very much for helping with this. Padma
  11. Serge, Thank you for your reply. I am new to jasper reports. How do I set these properties. Where do I cut and paste the properites in jrxml template file? When I tried to cut and paste the following properties in the report template, I am getting error. <property name="net.sf.jasperreports.export.csv.exclude.origin.band.columnFooter" value="columnFooter" /> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.pageFooter" value="pageFooter" /> Could you please explain further about the location where to set these properties. Thanks, Padma
  12. Hi, I have created a report template that has header and footer. I use this for exporting to pdf and csv formats. When I export the report to csv format, it has multiple pages. So, csv file is showing header and footer for all the pages. So, I want to export all data in to a single page in csv export so that the header and footer are not displayed repeatedly. Is there any way to set the parameter to export entire data in to csv as single page. I am just wondering if there a parameter in JRExporterParameter that I can set. I see PAGE_INDEX, but that does not work in my case as I want the entire data as a single page in csv export. JRCsvExporter exporter = new JRCsvExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream); Thanks, Padma
×
×
  • Create New...