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

ice-tux

Members
  • Posts

    11
  • Joined

  • Last visited

ice-tux's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. ok, finally i got the stuff working... my problem was: i was using iReport 3.6.0 to compile my reports, but used an older version in the application (don't ask me what version exactly) then i compiled the .jrxml file in iReport 3.0.0 and it started to work! also when compiling in the application it works, but not every report made with iReport 3.6.0 was compiled without errors... then i had to re-do it with iReport 3.0.0 regards, Florian
  2. Now i adapted my crosstab-report and put the crosstab in the summary-section and violla - there it is. But now i have a different problem: My crosstab goes over 27 pages, and the pagefooter won't be printed on each page, only on the first one... thats pretty annoying. I think (but i am absolutely not sure) that the engine thinks that the one details-band-entry (data record) is empty, so it won't print it into the report. can i tell JR that it should also print "empty" records? No matter what i do, there are no detail-bands in my reports... Can someone help me, please? Regards, Florian
  3. Is it possible that it doesn't work because there are libs or .jar's missing? But i do not get any Exception, its just that the details-section is missing in the resulting report...
  4. Doesn't look like it would help. Here is my updated jrxml: Code:<?xml version="1.0" encoding="UTF-8"?><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="easyReport" language="groovy" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <field name="Position.name" class="java.lang.String"/> <group name="MyGroup"> <groupExpression><![CDATA[$F{Position.name}]]></groupExpression> <groupHeader> <band height="24"/> </groupHeader> <groupFooter> <band height="50"/> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"> <staticText> <reportElement x="173" y="54" width="100" height="20"/> <textElement/> <text><![CDATA[positionsliste]]></text> </staticText> </band> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="21" splitType="Stretch"> <textField> <reportElement x="0" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Position.name}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>
  5. Thank you, i'll try this! I also made a CrossTab-Report. How do you pass the data to the Crosstab? Do you use a SubDataSource (and if so, how do you put it to the report) or do you have your Crosstab in the summary-section and use the main-datasource? What would be the "better" solution if you only want to print a crosstab (and no other data)? I am using a SubDataSource, in iReport i casted the DataSource to MyDataSource which provided a method where i get the SubDataSource. With the API this isn't possible so i wanted to use a parameter to put the SubDataSource to the report. (like i said a few times before: this worked in iReport, both with the cast and also with a static method...)
  6. Ok thanks. But this didn't change the behaviour of my application. Regards, Florian
  7. sergeleo Wrote: Also, in your test sample I don't see where are you setting data for your datasource. I can see empty constructors. Looks like data isn't present. Regards, Serge that's because my test-datasource only delivers a hard-coded string... i wanted to keep it as simple as possible to find out what is my problem. Code: @Override public Object getFieldValue(JRField jrField) throws JRException { //... return "test1"; }
  8. sure, but it is generated from iReport, and in iReport i can click "preview" and then the pdf-reader appears and everything works fine (i attached my DataSourceProvider through the iReport classpath) the reports is just a list of Position-names.... (with the given DataSource there is only one position) Code:<?xml version="1.0" encoding="UTF-8"?><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="easyReport" language="groovy" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <queryString> <![CDATA[]]> </queryString> <field name="Position.name" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"> <staticText> <reportElement x="173" y="54" width="100" height="20"/> <textElement/> <text><![CDATA[positionsliste]]></text> </staticText> </band> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="28" splitType="Stretch"> <textField> <reportElement x="0" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Position.name}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>
  9. Hi! I have some problems with using JR in my application. I created a report in iReport using a custom JRDataSource and everything worked fine there. Then i tried to create the report from my application, but all i get is my template as pdf with no data in it. I have some System.out's in the DataSource so i can see that the report-engine fetches the data. But the resulting PDF is empty. Here is my DataSource: Code: Thats the test-sample i've written: Code: I hope somebody can help me. greetings, Florian Post Edited by ice-tux at 09/24/2009 12:08 Post Edited by ice-tux at 09/24/2009 12:09 Post Edited by ice-tux at 09/28/2009 12:19
  10. Ok, now i got the thing working, didn't knew that i had to create a Sub-DataSet for Crosstabs... I extended my datasource that it can deliver another datasource by simply calling a method... in the "Connection Datasource expression" i casted the datasource of the report to MyDataSource and called it... It also works with an EmptyDataSource in iReport, then i call a static method which creates my DataSet for the CrossTab. The problem is now, that it works fine with iReport, but not from my Application (Eclipse RCP), but i think i have to post this to the JasperReports-Forum. Maybe there is a different way to fill the report with datasources and datasets.... Code: If i try to make it like this i only get an empty sheet that looks like the template (that i created in iReport) Post Edited by ice-tux at 09/24/2009 06:15
  11. Hello! I am trying to create a Crosstab (dynamic columns, dynamic rows) with IReport. The DataSource-Test succeeds, also the fields got found. First thing: If i try to import the Fields and ask the DataSource using the IReports-Dialog, all my Fields disappear! (But thats not my main problem, i can add the fields manually, some easy list-type-reports work well) My main problem: I get following Exception: Error filling print... Error incrementing crosstab dataset net.sf.jasperreports.engine.JRRuntimeException: Error incrementing crosstab dataset The datasource delivers the data like this: (in front of every line a next()-call happens of the DataSource, the JRFields are "row", "col" and "value") Row1 Col1 4 Row1 Col2 2 Row1 Col3 5 Row2 Col1 3 Row2 Col2 3 Row2 Col3 6 At least this type of Data can be used in Excel to create a Pivot-Table... The result would be something like this Col1 | Col2 | Col 3 ------------------------- Row1 4 | 2 | 5 Row2 3 | 3 | 6 I assume that Jasper needs its data the same way? I found one possible thing: In the "CrossTab Data"-Settings of iReport you can specify the increment-type and the reset-type. I want that the inrement happens each time the row changes, but there is no way to specify this. (I had an example with 2 Columns and then i set in the "Increment Type" the value "Column", but exactly at the half of the data i get the exception. What exactly are the increment-type and the reset-type? Or is there a complete different way to fill crosstabs in JasperReports? Greetings, Florian
×
×
  • Create New...