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

2002 JI Open Discussion

Members
  • Posts

    1,481
  • 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 2002 JI Open Discussion

  1. By: Adriana Mestrinelli Paranhos - jasperdri test if a report is empty...?? 2003-02-20 08:52 Hello everyone... i wanna test my report to find out if it?s empty or not....if it?s empty, i?ll show a message to user and i won?t show the report.... how can i do this?? thanx By: Vishy - vishyn RE: test if a report is empty...?? 2004-12-03 13:29 The best solution would be as follows. Put the message you want to display in the title and display only when the field values are null. This is tried and tested by me. hope this helps check this in PrintWhenExpression for the static text box new Boolean(($F{Ssn} == null) Vishy By: Teodor Danciu - teodord RE: test if a report is empty...?? 2003-02-20 12:31 Hi, The result of the report filling process is a dori.jasper.engine.JasperPrint object. In fact, the .jrprint files are serialized JasperPrint objects. You can test if the resulting document is empty by asking for the number of pages in the JasperPrint object using its getPages() method. You can see if a particular page is empty by asking for its number of elements using getElements() on the page object. You can load JasperPrint objects from .jrprint files using the JRLoader utility class. I hope this helps. Teodor By: John Eric Hamacher - badgerduke RE: test if a report is empty...?? 2004-11-26 12:31 Let me chime in . . . Calling getPages() and examining a List seems a bit awkward for such a fundamental piece of information. Perhaps there should be a simple boolean accessor . . . badgerduke By: cafepost - cafepost RE: test if a report is empty...?? 2004-12-14 10:31 I tried the solution for testing for a null field: "check this in PrintWhenExpression for the static text box new Boolean(($F{Ssn} == null) " but still get an empty report if empty. I am creating a pdf and I don't know it's empty until I run it. So how could I use the jasperPrint methods getPages() getMethod() ? I am new to this as well and have not used any scriptlets in the xml. Is this what I need to do? Please help!! Just in case it helps, here's my partial xml file content: ........ <title> <band height="30"> <printWhenExpression><![CDATA[new Boolean($F{TOT_SCAN}==null)]]></printWhenExpression> <staticText> <reportElement x="40" y="20" width="60" height="20" forecolor="blue"/> <textElement > <font pdfFontName="Helvetica-Bold" size="14"/> </textElement> <text><![CDATA["No Items Were Found For That Criteria"]]></text> </staticText> </band> </title> Thanks a lot. By: cafepost - cafepost RE: test if a report is empty...?? 2004-12-16 09:44 I've been thinking about this. I don't think printWhenExpression is the problem. The text that that it is assigned to prints if I change the operator to != . I just think PDF it just ignores the empty report like usual. I'm going to try it in html and see if I can get any clues.
  2. By: Hillebrand Gelderblom - hgelderblom Open in new browser window 2003-06-20 04:58 I use hyperlinks in my generated pdf. The report is part of a webapp and i open the pdf inline in a browser window. The report contains hyperlink that points to a report that shows more detail. My problem is that when the hyperlink is clicked on it opens the report in the same window, therefore discarding my master report. I cannot use the back button to get back to my master report because the form with the parameters no longer exists and the report cannot be generated again. If i could open the detail report in a new window it would be fixed. Is this possible with jasperreports and how?? can you specify a target in the link?? By: Paddy - shamking RE: Open in new browser window 2004-11-30 04:24 This is how I did it in the browser Under Hyperlink Reference Expression "/maps/displayLocationsOnMap.do?&vehicleRid=" + $F{id} + "&mobileNumber=" + $F{mobileNumber} + "" target="_top"" + " onclick="javascript:parent.startWait();" By replacing _top with _blank I think it should work. Paddy
  3. By: Rama Kodumagulla - rkodumagulla NullPointerException 2003-01-02 08:26 I have this problem when using WSAD 5.0, but the same code runs fine using command line compile. java.lang.NullPointerException at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094) at org.apache.commons.digester.Digester.parse(Digester.java:1144) at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:353) at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:309) at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:96) at org.dhhs.dirm.acts.query.QueryApp.main(QueryApp.java:146) NESTED BY : dori.jasper.engine.JRException at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:357) at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:309) at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:96) at org.dhhs.dirm.acts.query.QueryApp.main(QueryApp.java:146) Here is my code: fileName = "C:\Install\ActsReports\templates\QueryOneDef.xml"; System.setProperty("jasper.reports.compile.class.path", "C:\install\ActsReports\Jasperreports\lib\jasperreports.jar"); System.setProperty("jasper.reports.compile.temp", "C:\install\ActsReports\templates"); String oldSaxDriver = System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser"); JasperCompileManager.compileReportToFile(fileName); System.err.println("Compile time : " + (System.currentTimeMillis() - start)); System.exit(0); I am failing to compile the XML document. Your help will be highly appreciated. Thanks, rkodumagulla
  4. By: CARLOS ALBERTO SILVA - csilva2001 set variable w/ script 2003-01-02 16:44 Hi. I know it is easy. But I'm a stupid and do not know how: In my DB the data A is numeric. When data A is 1, I want show "journal". If data A is 2, I want show "letter" and if data A is 3, I want show "nothing". Please, step by step, how a build it? sorry, :).. Carlos By: Teodor Danciu - teodord RE: set variable w/ script 2003-01-03 00:04 Hi, Let's say your A field is and Integer. <textFieldExpression> (A.intValue() == 1)? ("journal"): ( (A.intValue() == 2)? ("letter"): ("nothing") ) </textFieldExpression> Not tested it, but it should work. Good luck! Teodor By: Chuck Deal - cdeal RE: set variable w/ script 2003-01-03 05:22 I had to do a similar task. And due to the length of the function I chose to use a Scriptlet over embedding the logic in the XML. The Scriplet sample was perfect for me to learn what I needed. In the Summary section of that report, you will see a call to a custom function called hello(). This should be all that you need in order to figure out how to use Scriplets.
  5. By: cklee - neocklee Line Printer 2003-12-23 21:09 May I know how jasperreport handle with line printer? I try to send preview and pdf output to printronix printer. the font distorted.. I believe the transmission to the printer is in bitmap mode.. May I know is there any way for me to send in charactor mode.. thanks. cklee By: Teodor Danciu - teodord RE: Line Printer 2004-01-09 14:18 Hi, The CVS repository version has a patch that optimises the printer output. Maybe it will solve you problem too. Thank you, Teodor By: JotaJotin - irracional79 RE: Line Printer 2004-11-17 08:48 sorry Teodor, i can?t find that patch. Where exactly is it? can you post a link? thanks By: JotaJotin - irracional79 RE: Line Printer 2004-11-25 03:53 anyone knows where to find that patch? thanks all!
  6. By: susun - wellrun About JasperViewer 2003-06-23 01:13 Hello,everyone .i have a question want to ask for you. when i use JasperViewer to see the Report(after data filled),why it says "The document has no pages"? i am very illusive with the JasperReport,headache. By: Teodor Danciu - teodord RE: About JasperViewer 2003-07-07 13:14 Hi, The data source you supplied to the report was probably empty, so the engine did not generate any page. If you want to see something displayed even there is no data, use whenNoDataType="AllSectionsNoDetail" in your report template. I hope this helps. Teodor By: JotaJotin - irracional79 RE: About JasperViewer 2004-11-24 07:17 i have the same problem, i used whenNoDataType="AllSectionsNoDetail", i use the title band, i also fill the report with a new HashMap() and a new JREmptyDataSource() and JasperViewer shows me no data (instead showing me the message document has no data). But when i save (the report within the JasperViewer) as pdf,xsl... y SEE THE DATA. Can u help me Teodor? Thanks four your advices
  7. By: Shahzad Badar - xhahzad showing arabic text in jasper reports 2003-08-25 21:56 I know that jasperreport support unicode characters but i dont know that how to show arabic text in jasper reports please help me in this problem with a small example. thanks in advance.. By: Teodor Danciu - teodord RE: showing arabic text in jasper reports 2004-11-16 11:15 Hi, JasperReports now supports right-to-left writing. Check the "unicode" sample that comes with version 0.6.2. Thank you, Teodor
  8. By: Ravi - ravishankarn ARABIC CHARACTERS 2003-11-06 16:19 Hi all, An urgent requirement: Can JASPER REPORTS print ARABIC CHARACTERS? PLease let me know asap, thanks a lot. Regards, Ravi Shankar By: Teodor Danciu - teodord RE: ARABIC CHARACTERS 2004-11-16 11:15 Hi, JasperReports now supports right-to-left writing. Check the "unicode" sample that comes with version 0.6.2. Thank you, Teodor
  9. By: Peter Kohlendorfer - kohlendorfer PDF generation with Herew/Arabic characters 2003-02-19 05:24 Hi, when printing a text consisting of Hebrew/Arabic characters from right to left I get the following behaviour: In the preview dialog the character order is right to left -> fine. Printing is the same result as preview -> fine. When generating a pdf file the character order is reversed: left to right -> :-( (e.g. table = elbat) Does somebody know, what to do about this? Thanks, Peter By: Peter Kohlendorfer - kohlendorfer RE: PDF generation with Herew/Arabic characters 2003-02-19 07:16 Hi, I got a reply from one of the iText authors: "Jasper uses ColumnText to display text. By default no ordering is made. You'll have to call ColumnText.setRunDirection(PdfWriter.RUN_DIRECTION_RTL) to have reordering. It's probable that a new Jasper attribute is needed or that jasper scans the text and then decide what to do baseed on the characters, noting that hebrew will also need reordering." I looked it up and found out that iText 0.92 does not support the run direction RTL. Current version 0.96 does. Does this mean that JR currently does not support the generation of Arabic/Hebrew pdf files? Greetings, Peter By: Teodor Danciu - teodord RE: PDF generation with Herew/Arabic characters 2003-02-19 12:35 Hi, After all you said, it seems it doesn't. If you're interested, you can study this issue and maybe come up with a suggestion or even a patch. Thank you, Teodor By: Teodor Danciu - teodord RE: PDF generation with Herew/Arabic characte 2004-11-16 11:14 Hi, JasperReports now supports right-to-left writing. Check the "unicode" sample that comes with version 0.6.2. Thank you, Teodor
  10. By: Roberto Rios - bobrivers International Patterns 2003-04-11 15:32 Hi, I have a field that returns a Double. I'm trying to format it. I have defined that the field pattern is "#,##0.00;(#,##0.00)" and it works fine. But my problem is that here in Brazil, we use #.##0,00. How do I do this? Is it possible to set the locale in JR? TIA, Bob By: Giulio Toffoli - gt78 RE: International Patterns 2003-04-12 11:19 Here in Italy it's the same, but when I use the pattern: #,##0.00 the NumberFormat instance created by jasperreports is already localized and the result is correct (something like 1.234,56) Giulio By: Roberto Rios - bobrivers RE: International Patterns 2003-04-14 14:02 Giulio, You were right. I changed my server configuration, and it worked. Thanks, Bob By: Giuseppe Bressan - gusbress RE: International Patterns 2004-11-19 07:29 I have a webbapp... is it possible to use e different locale for different usere? By: Teodor Danciu - teodord RE: International Patterns 2004-11-19 07:36 Hi, Yes, it is possible. Check the new 0.6.2 version and the "i18n" sample. Thank you, Teodor By: Giuseppe Bressan - gusbress RE: International Patterns 2004-11-19 08:00 Thank you!
  11. By: Paul Schaefer - chromeguru Acrobat 5.0 conversion bug? 2003-12-01 08:10 Is anyone seeing an issue when converting to Acrobat 5.0 or 5.5? It is working fine for 6.0, but I am having issues with 5.0 and 5.5. Rerports are being generated blank, and sometimes just "messy". Might be table related but wanted to check with some other folks. Thanks... By: Christian Hargraves - engrean RE: Acrobat 5.0 conversion bug? 2004-11-15 09:25 I see this problem, but only with and image that I generate. The fonts on the image end up being the opposite that I want under 5.0. Yet, if view the same exact pdf file under 6.0, everything looks great.
  12. By: Avinash - gavinash JRBeanCollectionDataSource in Subreports 2003-01-06 16:15 Hi, I have a bean that I will be using a datasource to fill my reports. Some properties of the bean are other beans. My report would need to populate data from both the top level (parent) as well as the children. Do I have to use subreports necessarily for the portions of the report that has the data of the child or can I do something simpler. All help is highly appreciated. Thank You Avinash By: Kjetil T. - kjetolle RE: JRBeanCollectionDataSource in Subreports 2003-10-27 23:47 Hi, I'm having the same problem. I have made two separate reports using JRBeanCollectionDataSource. One bean in report A has one or many children in report B. As standalone both reports display correctly. I then tried to merge these two reports together, making A master and B subreport. Sadly with no luck so far. I've also tried to put the report B level directly into report A by adding the children to the level A collector. This fails. Below is a skeleton of my report A. Can anyone tell me how to add the children to the parent, either by adding them to the bean collector or by using a subreport? public class AvtaleRapport { public static final String REPORT_NAME = "/resources/reports/TgAvtaleRapport.xml"; JasperReport jasperReport = null; public AvtaleRapport() { this(REPORT_NAME); } public AvtaleRapport(String reportName) { InputStream in = AvtaleRapport.class.getResourceAsStream(reportName); if (in == null) { throw new IllegalArgumentException(reportName); } try { jasperReport = JasperCompileManager.compileReport(in); } catch (JRException jre) { throw new IllegalStateException("Error while compiling report: " + jre); } } public void fillReport() throws EjbHomeFactoryException, javax.ejb.CreateException, javax.ejb.FinderException, java.rmi.RemoteException { Map parameters = new HashMap(); try { //Get the bean collection EjbHomeFactory ejbHomeFactory = EjbHomeFactory.getFactory(); AvtaleAfHome avtaleAfHome = (AvtaleAfHome) ejbHomeFactory.lookUpHome(AvtaleAfHome.class); List collector = new ArrayList(); AvtaleLevdbAltVO avtAltVO = avtaleAf.finnAvtaleLevdbAltVO(new Integer(82), new Integer(1)); collector .add(avtAltVO); } JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, new JRBeanCollectionDataSource(collector)); JasperPrintManager.printReportToPdfFile(jasperPrint,PDF_FILE_NAME); JasperViewer.viewReport(jasperPrint, false); } catch (JRException jre) { throw new IllegalStateException(jre); } } Here's a skeleton of my report A By: Sumedh - stamhane RE: JRBeanCollectionDataSource in Subreports 2004-07-04 06:20 put the jar file in which the class u want to use exists into the web-inf/lib folder By: Teodor Danciu - teodord RE: JRBeanCollectionDataSource in Subreports 2003-01-07 07:08 Hi, No, you don't have to use subreports for that. All you have to know is that the JRBeanCollectionDataSource uses Java reflection based on the JavaBeans method conventions to retrieve field values. If you know that some of the parent bean "get" methods return other beans (children), then you can declare report fields of class Object and cast them to the approapriate class. This way you could call methods on them in the report expressions. Report expressions are real Java expressions, remember ? Taking this to the extreme, you could give up using any build-in data source and create you own data source which returns only one field, which is always the current parent bean. You cast it to the corresponding class and call any get method you might want on it, being able to navigate even to its child objects. I hope this makes sens and helps. Teodor By: Salman Khattak - khattaksd JRBeanCollectionDataSource Teodord / CBox 2004-06-30 20:32 I am stuck in this situtaion: To use 'casting' for fields, I believe the class should be in the classpath both at compilation and filling time. I am using Jasper in a webapp, where the classpath would not be set. Is there a way out of this rock and a hard place? By: primarykey - primarykey RE: JRBeanCollectionDataSource in Subreports 2004-07-20 00:50 I have a problem like you told and I tried to use JRBeanCollectionDataSource. My bean and child bean has been seen correctly in the report. But I couldn't understand how to show my grandchild beans in the report. Can you send a sample report and CustomDataSource implementation for this? My report style is: Parent Bean --Child Bean1 --GrandChildBean1.1 --GrandChildBean1.2 --Child Bean2 --GrandChildBean2.1 --GrandChildBean2.2 By: MLA - dozylocal RE: JRBeanCollectionDataSource in Subreports 2004-11-02 05:07 This may sound like a silly question, but how/where does one cast the fields to the correct class? In the XML? Thanks QUOTE: "If you know that some of the parent bean "get" methods return other beans (children), then you can declare report fields of class Object and cast them to the approapriate class. This way you could call methods on them in the report expressions. "
  13. By: Reinhard Achleiter - crazyreini print on a new page 2003-05-02 04:38 I have one group which i want to print on an a new page, so i set the printOnANewPage attribut to true, but nothing happens. Are there any additional settings have to be made? kind regards Reinhard Achleitner By: Teodor Danciu - teodord RE: print on a new page 2003-05-07 13:51 Hi, Are you talking about isStartNewPage="true" for your group? It should work. If not, can I see the XML report design? teodord@hotmail.com Thank you, Teodor By: Dunbar - tdunbar317 RE: print on a new page 2004-08-30 12:04 I have the same problem. Two of my groups are not appearing on the second page. The groups that are not showing up on the second page are BreakGroup2 & BreakGroup3; The XML report design is attached. Thanks in advance for you help. <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="AAN_AMRAP_Proof" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="612" pageHeight="792" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="2" /> <parameter name="ID" isForPrompting="true" class="java.lang.Integer"/> <parameter name="currDate" isForPrompting="false" class="java.lang.String"/> <parameter name="pkey" isForPrompting="false" class="java.lang.String"/> <parameter name="ProgramKey" isForPrompting="true" class="java.lang.String"> <defaultValueExpression ><![CDATA[new java.lang.String("1781")]]></defaultValueExpression> </parameter> <parameter name="absPath" isForPrompting="true" class="java.lang.String"> <defaultValueExpression ><![CDATA[new java.lang.String("C:\htdocs\JasperReporting\cdg_project\web\")]]></defaultValueExpression> </parameter> <queryString><![CDATA[select t.topic, p.program_key, p.full_date, p.progtype_desc, p.startTime_of_Program, p.endTime_of_Program, p.title, program_id, p.full_name, p.description, p.completion, p.aud_Practitioners, p.aud_Fellows, p.aud_Residents, p.aud_Nurses, p.aud_Academicians, p.aud_Other, p.cme_credit, p.program_level, p.Presenter_Description, p.City, p.State_Province, p.Country from vam_program_Information_amrap as p left join vAMRAP_TopicsCount_Concat as t on (p.program_key = t.program_key) WHERE p.Program_Key = $P{ProgramKey}]]></queryString> <field name="topic" class="java.lang.String"/> <field name="program_key" class="java.lang.Integer"/> <field name="full_date" class="java.lang.String"/> <field name="progtype_desc" class="java.lang.String"/> <field name="startTime_of_Program" class="java.lang.String"/> <field name="endTime_of_Program" class="java.lang.String"/> <field name="title" class="java.lang.String"/> <field name="program_id" class="java.lang.String"/> <field name="full_name" class="java.lang.String"/> <field name="description" class="java.lang.String"/> <field name="completion" class="java.lang.String"/> <field name="aud_Practitioners" class="java.lang.Integer"/> <field name="aud_Fellows" class="java.lang.Integer"/> <field name="aud_Residents" class="java.lang.Integer"/> <field name="aud_Nurses" class="java.lang.Integer"/> <field name="aud_Academicians" class="java.lang.Integer"/> <field name="aud_Other" class="java.lang.String"/> <field name="cme_credit" class="java.lang.String"/> <field name="program_level" class="java.lang.Integer"/> <field name="Presenter_Description" class="java.lang.Integer"/> <field name="City" class="java.lang.String"/> <field name="State_Province" class="java.lang.String"/> <field name="Country" class="java.lang.String"/> <variable name="myAud" class="java.lang.String" resetType="None" calculation="Nothing"> <variableExpression><![CDATA[(($F{aud_Practitioners}.intValue()==1)?"Practitioners, ":"") + (($F{aud_Fellows}.intValue()==1)?"Fellows, ":"")+ (($F{aud_Residents}.intValue()==1)?"Residents, ":"")+ (($F{aud_Nurses}.intValue()==1)?"Nurses, ":"")+ (($F{aud_Academicians}.intValue()==1)?"Academicians, ":"") + (($F{aud_Other}!=null)?$F{aud_Other}:"")]]></variableExpression> </variable> <variable name="myDirector" class="java.lang.String" resetType="None" calculation="Nothing"> <variableExpression><![CDATA[", " + $F{City} + ($F{State_Province}.trim().length() < 2?"":", " + $F{State_Province}) + ($F{Country}.trim().length() < 2?"":", " + $F{Country})]]></variableExpression> </variable> <variable name="totalPages" class="java.lang.String" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[string.valueOf($V{PAGE_NUMBER})]]></variableExpression> </variable> <group name="BreakGroup" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="false" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="0" > <groupExpression><![CDATA[$F{program_id}]]></groupExpression> <groupHeader> <band height="113" isSplitAllowed="false" > <staticText> <reportElement mode="Transparent" x="6" y="0" width="542" height="24" forecolor="#000000" backcolor="#FFFFFF" key="staticText" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-BoldOblique" size="18" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Annual Meeting Program Description]]></text> </staticText> <line direction="TopDown"> <reportElement mode="Opaque" x="0" y="27" width="538" height="0" forecolor="#000000" backcolor="#FFFFFF" key="line" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <graphicElement stretchType="NoStretch" pen="2Point" fill="Solid" /> </line> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="0" y="29" width="160" height="15" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-Bold" size="10" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{full_date}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="165" y="29" width="155" height="15" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-Bold" size="10" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{progtype_desc}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="325" y="29" width="227" height="15" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-Bold" size="10" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{startTime_of_Program} + " - " + $F{endTime_of_Program}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="0" y="45" width="548" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-Bold" size="12" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{program_id} + " " + $F{title}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="103" y="77" width="301" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{full_name} + $V{myDirector}]]></textFieldExpression> </textField> <staticText> <reportElement mode="Transparent" x="3" y="77" width="96" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-BoldOblique" size="12" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Director: ]]></text> </staticText> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="103" y="96" width="444" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" printWhenGroupChanges="BreakGroup" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[($F{program_level}.intValue() == 1)?"Basic Knowledge":(($F{program_level}.intValue() == 2)?"Advanced Knowledge":"Basic & Advanced Knowledge")]]></textFieldExpression> </textField> <staticText> <reportElement mode="Transparent" x="410" y="77" width="77" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-BoldOblique" size="12" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[CME Credit: ]]></text> </staticText> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="492" y="77" width="34" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{cme_credit}]]></textFieldExpression> </textField> <staticText> <reportElement mode="Transparent" x="3" y="96" width="96" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-BoldOblique" size="12" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Program Level: ]]></text> </staticText> </band> </groupHeader> <groupFooter> <band height="22" isSplitAllowed="true" > <subreport isUsingCache="true"> <reportElement mode="Opaque" x="0" y="0" width="552" height="17" forecolor="#000000" backcolor="#FFFFFF" key="subreport" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="true"/> <subreportParameter name="ID"> <subreportParameterExpression><![CDATA[$F{program_key}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA[$P{absPath} + "reports\\FacultyLecture.jasper"]]></subreportExpression> </subreport> </band> </groupFooter> </group> <group name="BreakGroup2" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="false" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="0" > <groupExpression><![CDATA[null]]></groupExpression> <groupHeader> <band height="17" isSplitAllowed="false" > <staticText> <reportElement mode="Transparent" x="3" y="0" width="96" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" printWhenGroupChanges="BreakGroup2" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-BoldOblique" size="12" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Audience: ]]></text> </staticText> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="103" y="0" width="430" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" printWhenGroupChanges="BreakGroup" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{myAud}.trim().endsWith(",")?$V{myAud}.trim().substring(0,$V{myAud}.length()-2):$V{myAud}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="17" isSplitAllowed="false" > <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="0" y="0" width="535" height="16" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="11" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[(($F{Presenter_Description}.intValue() == 1)?($F{completion}):"")]]></textFieldExpression> </textField> </band> </groupFooter> </group> <group name="BreakGroup3" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="false" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="0" > <groupExpression><![CDATA[null]]></groupExpression> <groupHeader> <band height="18" isSplitAllowed="false" > <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="104" y="0" width="431" height="17" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" printWhenGroupChanges="BreakGroup" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{topic}]]></textFieldExpression> </textField> <staticText> <reportElement mode="Transparent" x="3" y="0" width="96" height="17" forecolor="#000000" backcolor="#FFFFFF" key="staticText-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" printWhenGroupChanges="BreakGroup3" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica-BoldOblique" size="12" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Topic(s): ]]></text> </staticText> </band> </groupHeader> <groupFooter> <band height="17" isSplitAllowed="false" > <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="1" y="0" width="535" height="16" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="true"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="11" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[(($F{Presenter_Description}.intValue() == 1)?($F{description}):"")]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band height="0" isSplitAllowed="false" > </band> </background> <title> <band height="0" isSplitAllowed="false" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="false" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="false" > </band> </columnHeader> <detail> <band height="0" isSplitAllowed="false" > </band> </detail> <columnFooter> <band height="3" isSplitAllowed="false" > </band> </columnFooter> <pageFooter> <band height="18" isSplitAllowed="false" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Transparent" x="448" y="0" width="101" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{currDate}]]></textFieldExpression> </textField> <staticText> <reportElement mode="Transparent" x="366" y="0" width="79" height="13" forecolor="#000000" backcolor="#FFFFFF" key="staticText" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="sansserif" pdfFontName="Helvetica" size="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" /> </textElement> <text><![CDATA[Report creation date: ]]></text> </staticText> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement mode="Opaque" x="178" y="5" width="73" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField-1" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Page " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" > <reportElement mode="Opaque" x="251" y="5" width="64" height="13" forecolor="#000000" backcolor="#FFFFFF" key="textField-2" stretchType="NoStretch" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[" of " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="0" isSplitAllowed="false" > </band> </summary> </jasperReport> By: uniyal - auniyal RE: Again print on a new page 2004-10-25 03:51 Hi, Any updates on break, i am really stuck with this, Posting my XML. SIMPLE: i just want to see the two pages when i execute this report. <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="TestBreakSubReport" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="AllSectionsNoDetail" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="2" /> <group name="Break1" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" > <groupExpression><![CDATA[$V{Break1_COUNT}]]></groupExpression> <groupHeader> <band height="50" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="50" isSplitAllowed="true" > </band> </groupFooter> </group> <group name="Break2" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" > <groupExpression><![CDATA[$V{Break2_COUNT}]]></groupExpression> <groupHeader> <band height="50" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="50" isSplitAllowed="true" > </band> </groupFooter> </group> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="50" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="50" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="30" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="100" isSplitAllowed="true" > </band> </detail> <columnFooter> <band height="30" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="50" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="50" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="50" isSplitAllowed="true" > </band> </summary> </jasperReport>
  14. By: Ryan Littrell - ryanlittrell Printing a Reciept w/ variable page height 2003-10-15 12:54 Im trying to print to a receipt printer and i want my report to scale the paper height based on the number of records in the detail band. Example. a point of sale receipt Can i use parameters and pass the pageheight in at runtime based on an algorithm incorporating the rec count from the database? By: cosjav - cosjav RE: Printing a Reciept w/ variable page heigh 2004-08-23 22:37 I am in need of a solution to this aswell... can someone help please?
  15. By: Moisey Blehman - rhal Columns filling order - Horizontal 2003-01-14 09:36 Hi. When are you going to implement horizontal order of columns filling? Documentation states that it "Not implemented". Maybe there is some other way? Thanks for the help. Rhal. By: Teodor Danciu - teodord RE: Columns filling order - Horizontal 2003-01-17 07:18 Hi, Since now there seems to be a lobby for that, I think I cannot postpone it anymore. Thank you, Teodor By: David DOUSSOT - ddoussot RE: Columns filling order - Horizontal 2004-08-02 05:35 In fact, you have to declare multiple columns to make it work ! The data will fill the columns in order.
  16. By: Ricardo Trindade - rjst images in html reports 2003-02-07 04:21 Hi, I'm using the new HTML exporter to generate HTML from a servlet, and it works fine. However, I don't know how to include an image my report has (generated with jfreecharts). thanks Ricardo By: Jerry Shao - shaogang RE: images in html reports 2004-03-17 20:09 Have you found solutions?
  17. By: Ryan Fruit - rfruit Multiple page report 2003-11-03 12:44 Is it possible in Jasper Reports to have a multiple page report? I have a report with too many columns to fit on a landscape oriented page, so I need each row of the report to span 2 or more pages. Anyone know a way to do this? I tried simply making a large page but when I print the PDF it either shrinks it and makes it unreadable or it truncates the part that is off the page. thanks. By: sunnf - sunnf RE: Multiple page report 2004-04-27 04:02 i want to know!
  18. By: Betuca Buril - betuca multivalue parameter 2003-03-13 13:22 Hello people! I was trying to use Jasper with Ireport and i´ve got some questions. When i use a database connection with a SQL select it works realy fine. I used a field on the IReport toll ($F{field_name}). In another java class i needed to use a list of parameters, but i cant make it work. Does anyone knows how can i put on the report an Array( collection, list, ...) on a parameter? Thanks for your help By: Teodor Danciu - teodord RE: multivalue parameter 2003-03-13 13:40 Hi, This smells like subreports combined with JRBeanCollectionDataSource. You can pass your collection as a parameter, but you need a subreport to iterate on it and generate some output in the master document. Check the "subreport" and the "datasource" samples. I hope this helps. Teodor By: Enrico Goosen - enricogoosen RE: multivalue parameter 2003-03-13 22:59 Further to what Teodor wrote... Remember to set the parameter class to "java.lang.Object". Then cast it to the appropriate Type. In my report I pass a HashMap as a parameter. I've got a scriptlet that uses the HashMap to display totals in the Summary section of the report. This might be useful in your case...if so, check out the scriptlet example, in the samples section. Regards, Enrico By: Betuca Buril - betuca RE: multivalue parameter 2003-03-17 12:19 Thank you guys! After your help a I made it work! thanks again! Betuca. By: Jonathan - jtoczek RE: multivalue parameter 2004-04-22 07:03 I have the same problem...how you solve? thanks
  19. By: Arun Kumar PG - pgarunkumar Not getting "Summary" at end of a page! Help! 2003-12-30 02:56 Hi all! Can any 1 tell me how to get the summary section at the bottom of a page. Actually, I have a design where I have a detail band and after that I have a summary band. The problem is that when the Detail does not contains anything the summary band rises above the bottom of the page and therefore a gap is created between the botton of the page and summary. It looks awkward! Here is how the page looks: ------START REPORT------ _________________________ Page header _________________________ Group A _________________________ Detail _________________________ GROUP A FOOTER (This a line) _________________________ SUMMARY _________________________ --------END REPORT------ GAP COMES HERE when no detail present (it looks awkward!) _________________________ PAGE FOOTER _________________________ What I want is this: ------START REPORT------ _________________________ Page header _________________________ Group A _________________________ Detail _________________________ GROUP A FOOTER (This a line) _________________________ GAP CAN COME HERE if no detail is present (Itz okie) _________________________ SUMMARY _________________________ PAGE FOOTER _________________________ ------END REPORT------ Can any 1 tell me how to get rid off the first type of Report shown above! Thankz in advance Arun By: Teodor Danciu - teodord RE: Not getting "Summary" at end of a page! Help! 2003-12-31 06:23 Hi, This can only ba achieved using a trick like the following: Place your summary elements in the page footer at a negative Y coordinate so that they actually appear above the top of the page footer. Use their <printWhenExpression> based on a boolean flag to suppress these elements on all pages except the last. To indicate that the report generation reached the last page, use an invisible element (white line) in the actual summary section that would have a dummy <printWhenExpression> of its own whose only purpose is to set your last page flag to true. I hope this helps. Teodor By: rflair - rflair RE: Not getting "Summary" at end of a page! Help! 2004-04-14 05:22 Hi! I don't understand the end of the text : "a dummy <printWhenExpression> of its own whose only purpose is to set your last page flag to true" what is "dummy <printWhenExpression>" and how can it mark the end of report? thanks!
  20. By: Tom Farrand - idletom Passing Integer parameter to subreports 2003-11-06 09:08 Hi, I've been investigating subreports within jasper, by playing around with the subreport sample. I have succesfully modified the sample to use my own data, and pass String parameters to the subreport, but when I've tried to pass an Integer parameter I get compilation error regarding inconvertiable types - it looks for a String, and finds my integer. command readout: C:Projectjasperdemosamplessubreport>c:projectantbinant compile Warning: JAVA_HOME environment variable is not set. If build fails because sun.* classes could not be found you will need to set the JAVA_HOME environment variable to the installation directory of java. Buildfile: build.xml compile: [echo] Compiling the MasterReport.xml file... [java] Compile time : 8235 [echo] Compiling the SemesterReport.xml file... [java] dori.jasper.engine.JRException: Errors were encountered when compiling report expressions class file: [java] C:ProjectjasperdemosamplessubreportSemesterReport.java:101: inconvertible types [java] found : java.lang.Integer [java] required: java.lang.String [java] value = (java.lang.String)(((java.lang.Integer)field_Semester.getValue())); [java] ^ [java] C:ProjectjasperdemosamplessubreportSemesterReport.java:194: inconvertible types [java] found : java.lang.Integer [java] required: java.lang.String [java] value = (java.lang.String)(((java.lang.Integer)field_Semester.getOldValue())); [java] ^ [java] C:ProjectjasperdemosamplessubreportSemesterReport.java:287: inconvertible types [java] found : java.lang.Integer [java] required: java.lang.String [java] value = (java.lang.String)(((java.lang.Integer)field_Semester.getValue())); [java] ^ [java] 3 errors [java] at dori.jasper.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:154) [java] at dori.jasper.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:136) [java] at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:135) [java] at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:107) [java] at SubreportApp.main(SubreportApp.java:134) [java] Java Result: 1 [echo] Compiling the AddressReport.xml file... [java] Compile time : 3172 [echo] Compiling the ProductReport.xml file... [java] Compile time : 3203 BUILD SUCCESSFUL Total time: 37 seconds C:Projectjasperdemosamplessubreport> Does anyone have any idea what I have to change to pass integers to the subreport? Thanks! Tom (sorry if this has been covered before, I searched but didnt find anything) By: Hopoz - hopoz RE: Passing Integer parameter to subreports 2004-03-30 19:20 Try either setting the textField Expression Class to Integer. or setting the TextField Expressiong to $F{Semester}.toString() By: David Lim - aberrant80 RE: Passing Integer parameter to subreports 2004-03-30 22:15 Almost any tag that contains an expression contains an attribute called class, in which you set the actual class your value is. So, <field name="Semester" class="java.lang.Integer">
  21. By: XiaoQiangYang - fatmole Chinese data from database display incerrect 2003-06-24 01:32 My database is sqlserver2000. I retrived Chinese data from sqlserver database on Winnt,but it display incerrectly. Chinese static text in report display cerrectly. My setting as followed, pdfFontName="STSongStd-Light" pdfEncoding="UniGB-UCS2-H" Pdf,htnl.xls have same errors. How to resolve these errors By: XiaoQiangYang - fatmole RE: Chinese data from database display incerrect 2003-06-26 00:44 Chinese data display correctly after changed jdbc driver . By: mouyuan - muyuan11 RE: Chinese data from database display incerrect 2004-03-30 18:10 what driver are you useing?Microsoft or Sybase?which version?
  22. By: Michel - micheljr Error when generating PDF in Websphere 2003-05-16 06:46 I'm using Websphere/Windows and the log error message is: com.ibm.servlet.engine.srt.WriteBeyondContentLengthException Note: when I run my App using JBoss, everything works well. This is a short piece of my code (printPDFDoc.jsp): byte[] bytes = JasperRunManager.runReportToPdf( reportFile.getPath(), parameters, ); response.setContentType("application/pdf"); response.setContentLength(bytes.length); response.setHeader("Cache-Control", "no-cache"); ServletOutputStream ouputStream = response.getOutputStream(); ouputStream.write(bytes, 0, bytes.length); ouputStream.flush(); ouputStream.close(); Any ideas??? Thanks in advance By: Teodor Danciu - teodord RE: Error when generating PDF in Websphere 2004-03-30 11:35 Hi, I think this is a Websphere related problem. I have searched with Google and found something here: http://www.snug.nl/home/newsletter.nsf/0/dc271ce69590ae08c1256d5e0059ab3a?OpenDocument I hope this helps. Teodor
  23. By: Rudolf Ziegaus - ziegauru Vertical column titles/dyn. report generation 2003-05-12 15:29 Hello, I am new to JasperReport and currently investigating if we could use JasperReport for our Java application. Besides from what I have already seen and read, we need two features I have not found in the available documentation: 1) vertical column titles 2) Completely dynamic report generation (I have acompletly dynamic JCTable wher columns vary from one user to the other, from one invocation of our report to the other; we have some 600 columns to choose from, so I need to generate the output dynamically. Are these features supported by JasperReport? Thanks for any hints, Rudi By: Teodor Danciu - teodord RE: Vertical column titles/dyn. report generation 2003-05-13 12:53 Hi, 1) If you are talking about vertical heading text, the answer is no. JasperReports does not support rotating text. 2) Dynamic report templates are possible using the JasperReports API. However, they require compilation before being used for filling with data. But I already suggested ways of dealing with custom report templates that users can define for themseves: https://sourceforge.net/forum/message.php?msg_id=2010695 Future version will probably enhance or even eliminate the need for bytecode compilation in JasperReports. Thank you, Teodor By: Rudolf Ziegaus - ziegauru RE: Vertical column titles/dyn. report generation 2003-05-13 15:48 Hello Teodor, thanks for your hints. 1) Yep, I was talking about rotating text. Do have have plans to support this for a future version? 2) I did not check out your articel (will do so later), but my problem is not userdefined templates. It'ij more that they choose several of many (approx. 600) attributes. This results in a table being shown on the screen. Now they want to export or print exactly those attributes they have chosen in my application before. These attributes change from one export to the other, one user may choose any combination he likes. Maybe they some standard attributes, but it should also be possible to include any old attribute each time they do an export or print. Thansk for your comments, Rudi By: Teodor Danciu - teodord RE: Vertical column titles/dyn. report genera 2004-01-28 13:12 Hi, Rotating text is now possible. If you get the latest CVS version, there is a new "rotation" attribute for text elements. Possible values are "None", "Left" and "Right". Thank you, Teodor
  24. By: Gerson Luiz - gersonluiz Filling vertical text 2003-09-09 07:57 Hi! Can jasper reports fill vertical text??? Thank's! Gerson By: Teodor Danciu - teodord RE: Filling vertical text 2004-01-28 13:11 Hi, Now it can. If you get the latest CVS version, there is a new "rotation" attribute for text elements. Possible values are "None", "Left" and "Right". Thank you, Teodor
  25. By: Stephen Smithstone - ssmithstone Exporing to Excel Problem 2003-10-06 03:09 When exporting a record set of around 1400 rows to excel it produces the file and when the file is then tried to be opened it says excel is unable to open the file any tips im using 0.5.0 and jdk 1.4.1 with the poi 1.5.1 also how to i get rid of the white background on the excel sheet i tried setting the JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND to Boolean.FALSE but it still generates the white background By: William Frederico - estekguy RE: Exporing to Excel Problem 2003-10-09 13:37 Can help you with the "Unable to Open" problem at least. We just went through this problem ourself... "Unable to Open" errors with larger excel files is a known problem with POI 1.5.1. Apparently, the algorythm in 1.5.1 does some goofy stuff when building the excel files and eats up tons of memory. *SOLUTION* Upgrade to the latest version of POI (we are using 2.0 prerelease 3) This new version of POI fixes the problem with opening larger excel files. Also noticed that the excel files open up much faster. But wait, you may need some ** EVIL VOODOO MAGIC ** Just plopping the new POI jar in your lib directory may not work for you. (though you may not have this issue with Jasper 0.5.0 ) We were using Jasper 0.4.6, and when we went to the new POI jar, we started getting the following error when writing out to excel files : java.lang.NoSuchMethodError at dori.jasper.engine.export.JRXlsExporter.exportPage (JRXlsExporter.java:386) at dori.jasper.engine.export.JRXlsExporter.exportReportToStream (JRXlsExporter.java:353) at dori.jasper.engine.export.JRXlsExporter.exportReport (JRXlsExporter.java:282) Why did we get this error? Well, we had to dig down into the Jasper source code to find out. Look at the Jasper 0.4.6 JRXlsExporter object(dori.jasper.engine.export.JRXlsExporter) on line 386, and you'll see the following code: row = this.sheet.createRow((short)y); It's calling the createRow() method on a POI object named org.apache.poi.hssf.usermodel.HSSFSheet. However, it's casting the "y" var (which is an int) to a short. The new HSSFSheet.createRow() method only accepts "int" parameters, so passing it a "short" causes the error. To get by this , change the code on this line to the following: row = this.sheet.createRow( y ); Of course, you will need to recompile the entire Jasper project and create a new jar in order to use it, but this should get ya working. Please let me know if this helps! Bill By: Teodor Danciu - teodord RE: Exporing to Excel Problem 2004-01-24 11:26 Hi, The problem with the background is now corrected in the CVS version. Thank you, Teodor
×
×
  • Create New...