0

I would like to combine the examples of merging datasources and having multiple maps.

So instead of having a table datasource (1st example) I have a map datasource like the second example.

The goal is to output a report with a map in the first page, and other maps with features in the following pages (from datasource).

How to accomplish that? (config.yaml)

1 Answer 1

1

I ended up using only one report, with 2 createmap processors

config.yaml

templates:
  report: !template
    reportTemplate: report.jrxml
    outputFilename: report-${yyyyMMdd_hhmmss}
    attributes:
      ...
      map: !map
        maxDpi: 400
        width: 499
        height: 657
        ...
      datasource: !datasource
        attributes:
          ...
          map2: !map
            maxDpi: 254
            width: 220
            height: 332
            ...
      scalebar: !scalebar
        width: 126
        height: 47
      northArrow: !northArrow
        size: 50
        default:
          graphic: "images/north.svg"
    processors:
    - !reportBuilder # compile all reports in current directory
      directory: '.'
    - !createMap {}
    - !createScalebar {}
    - !createNorthArrow {}
    - !createDataSource
      processors:
        - !createMap
          inputMapper:
            map2: map
    tableData: jrDataSource    

In report.jrxml

...
<parameter name="mapSubReport" class="java.lang.String"/>
<field name="mapSubReport" class="java.lang.String"/>
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.