Search code examples
jasper-reportssubreport

How can I scale subreport in Jasper?


I have a subreport inside a report. My subreport is with dimensions 577x370, but I need to scale it up to 820x525 inside my main report.

Is it possible?


Solution

  • AFIK: No it's not possible

    You can not scale from main report nor can you send dimension to subreport, since you can't not set dimension of a jrxml report dynamically.

    The only thing that is possible is to allow subreport to stretch dynamically in height.

    Solution

    1. Design another scaled report and call correct one from main.

    2. Substitute your sub report with html (naturally not always feasible and with image result instead of searchable text elements in report), the hc:html allows dynamic scaling, since it creates an image of the html