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

accounts_8

Members
  • Posts

    8
  • Joined

  • Last visited

accounts_8's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. My TOC.jrxml is below :)<?xml version="1.0" encoding="UTF-8"?> ]]> </queryString> <field name="level" class="java.lang.Integer"/> <field name="label" class="java.lang.String"/> <field name="pageIndex" class="java.lang.Integer"/> <variable name="l2" class="java.lang.Integer"> <variableExpression><![CDATA[$F{level} == 1 ? 0 : ($F{level} == 2 ? ($V{l2} + 1) : $V{l2}) OR($F{level} == 1,$F{level} == 2) ? 0 : ($F{level} == 3 ? ($V{l3} + 1) : $V{l3}) $F{level} == 1 ? ($V{l1} + 1) : $V{l1} 0 OR($F{level} == 1,$F{level} == 2, $F{level} == 3) ? 0 : ($F{level} == 4 ? ($V{l4} + 1) : $V{l4}) "Inhaltsverzeichnis" new Boolean($V{PAGE_NUMBER}.intValue()>1) $P{heading2} $P{heading1} $P{logo} $F{level} == 1 $F{label} $F{label} $V{PAGE_NUMBER} + $F{pageIndex} + 1 $F{label} $V{l1} + "." $F{label} $F{level} == 2 $F{label} $F{label} $V{PAGE_NUMBER} + $F{pageIndex} + 1 $F{label} $V{l1} + "."+$V{l2} $F{label} $F{level} == 3 $F{label} $F{label} $V{PAGE_NUMBER} + $F{pageIndex} + 1 $F{label} $V{l1} + "."+$V{l2} + "."+$V{l3} $F{label} $F{level} == 4 $V{l1} + "."+$V{l2} + "."+$V{l3}+ "."+$V{l4} $F{label} $F{label} $F{label} $V{PAGE_NUMBER} + $F{pageIndex} + 1 $F{label} "Seite "+$V{MASTER_CURRENT_PAGE}+" von "+$V{MASTER_TOTAL_PAGES} $P{left_footer} [/code]
  2. Thank you for your quick response. Unfortunately, that doesn't fully answer my question. I want to access the heading number, not the page number. The picture should describe my problem. I
  3. I think your syntax is wrong. $F{orders.order_id} looks for a field called "orders.order_id". When you pass a Datasource to a (Sub-)Report, you have to create a field called "order_id" and call $F{order_id}. Jasperreports gets the data by calling public Object getFieldValue(JRField jrField) throws JRException from JRDataSource
  4. Hi Community, I user Jasperreports to create a report book. Book, ToC, Contents, Custom Datasources etc. work like a charm. Also, ToC has correct numbering for bookmarks (1. Foo, 1.1 FooSub, 1.1.1 FooSubSub, 2. Bar, 2.1 BarSub etc.). But I failed to add the bookmark numberings to the heading itself. How can I get a heading - e.g. "FooSub" - to print "1.1 FooSub"? It seems like there is no Varaibale, Field or Parameter for that number. Thanks!
  5. I always use SimpleDataRenderer for Images. E.g.: if( jrField.getName().equals(ExportFields.LOGO.getField()) ) return SimpleDataRenderer.getInstance( imageByteData )
  6. Hey All, hey C-Box, finally I managed to solve my problem (at least partially). What I did was: Preparation: Created a Report-Book, saved as JRXML within my resourcesCreated a bunch of SubReports, saved as JASPER within my resourcesNOTE: SubReports were not embedded inside my Report-BookDuring Runtime: Load Report-Book as JasperDesignIn preferred Order and for each SubReport:Add JRDesignPart with SubReportPart to DetailsSection of ReportBookLoad SubReport.JASPER as JasperReportAdd SubReport to ParametersAdd Custom Parameter Map as Parameter for SubreportRegards, Christoph
  7. Hey JR Community, any hint how to solve my following problem would be great: Setup: I have standalone Java Application (openJDK 11.0.2) with JR 6.8.0. I wand to create a PDF with a basic structure: titlepage,toc,...,<dynamic content>,...The dynamic content contains 1 to many pages which are designed equally (same report, different parameters). Question: How can Ì achieve to create such a PDF usind predesigned reports (e.g. basic-report.jasper and dynamic-content.jasper) and java code only? Especially adding x pages where every page depends on the same report. Any help/hint would be great! Best regards from Hamburg, Christoph
×
×
  • Create New...