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

saust

Members
  • Posts

    6
  • Joined

  • Last visited

saust's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. Thanks for your input. I hadn't noticed a problem with the footer position. After many attemps, I also concluded that it seems to be a bug with runToBottom. It doesn't matter what the following suppressed item is (a suppressed label will cause the same problem). Perhaps the page break following runToBottom is evaluated before determining whether the following code should be printed or not? I ended up fixing the problem with 2 copies of my subreport, one with runToBottom=true used for multiple page reports and one with runtToBottom=false for one page reports. Of course, I then had a footer problem on the one page report, so I had to add it all to an extra top report file with a footer only used for the one page report. Ann.
  2. Hi, I have a two page report with a subreport on each page. When both subreport are displayed everything works fine. However, when the second subreport is suppressed, I still get two pages one of which is blank. I use runToBottom=true for both subreports (so that they are on a seperate page with footers at the appropriate place), there's no space between the subreports or after the last one, and I checked remove Line When Blank. Anybody got an idea of what I am missing? I included part of the xml code below. Thanks, Ann. Code:<summary> <band height="12"> <subreport runToBottom="true"> <reportElement positionType="Float" x="0" y="0" width="540" height="6" isRemoveLineWhenBlank="true"/> ...... lots of parameters..... <subreportExpression class="java.lang.String"><![CDATA[$P{basePath} + "Darssa2ConsumerIntake_PFR1.jasper"]]></subreportExpression> </subreport> <subreport> <reportElement positionType="Float" x="0" y="6" width="540" height="6" isRemoveLineWhenBlank="true"> <printWhenExpression><![CDATA[$V{showDrugPage}]]></printWhenExpression> </reportElement> ...... more parameters..... <subreportExpression class="java.lang.String"><![CDATA[$P{basePath} + "Darssa2ConsumerIntake_PFR_drugs.jasper"]]></subreportExpression> </subreport> </band> </summary>
  3. Thanks for the pointer, my main program was sending the data as a datasource, so that would explain the error. From there, the example worked, and it was straightforward to switch to the beans, I needed to use. Thanks for all your help, Ann.
  4. Thanks, I did check that one out. If I could just connect to the database and retrieve data I would be done. Unfortunately I'm stuck using JavaBeans. I tried following the recipe from one of the older posts (titled passing a Collection as parameter), but is still unable to get things to work. Tomcat gives an error "The constructor JRMapCollectionDataSource(Map) is undefined". A pointer to a detailed example of passing JavaBeans would be really helpful. Ann.
  5. Thank you, that worked like a charm. This is so much more efficient than my first strategy which was passing individual javabeans to each chart. I was starting down that path before realizing how many classes I would have to create, however I was never able to get it to work passing parameters (as was stated in a post somewhere). Is there an example of this somewhere (since I'll have to do this in the not too distant future)? Thanks again, Ann.
  6. Hi, I'm trying to create a report with lots (50+) charts. I'm using a JavaBean to supply the data which has two variables (answer, percentile). Filtering on the original dataset would accomplish the goal. However, I'm having trouble getting my charts to talk to a subdataset containing the filtered data. I define the subdataset as: <subDataset name="genderChart" > <field name="answers" class="java.lang.String"/> <field name="percentile" class="java.lang.Double"/> <filterExpression><![CDATA[$F{answers}.equals("test") ? Boolean.FALSE : Boolean.TRUE]]></filterExpression> </subDataset> And add it to the (bar) chart: <categoryDataset> <dataset > <datasetRun subDataset="genderChart"> </datasetRun> </dataset> <categorySeries> <seriesExpression><![CDATA["Gender"]]></seriesExpression> <categoryExpression><![CDATA[$F{answers}]]></categoryExpression> <valueExpression><![CDATA[$F{percentile}]]></valueExpression> </categorySeries> </categoryDataset> I have not been able to find an example showing how to use the subdataset with the JavaBean and this code doesn't work. Any help/pointers/examples would much appreciated. Thanks, Ann.
×
×
  • Create New...