Jump to content
Changes to the Jaspersoft community edition download ×

How to achieve multiple pages in Jaspersoft Studio?


Recommended Posts

Hi all,

I have made this report in Jaspersoft Studio which needs to be printed 3 times, but with another title. The other information on the report is the same.

I have no idea how to achieve this, but I came up with an unnested SQL array first:

case when a.unnest = '1' then 'Title 1' when a.unnest = '2' then 'Title 2' when a.unnest = '3' then 'Title 3' end as title_copyFROM table_name join (SELECT unnest(array['1', '2', '3'])) a on true WHERE table_name.service_id = '123456679' [/code]


Now I need to make something like a while loop based on 'title_copy' but how can this be achieved within Jaspersoft Studio?

If someone have any tips or any other suggestion to achieve 3 (same) pages in Jaspersoft Studio, I would love to hear it.

Thanks in advance!

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Have you considered designing your query as 3 queries combined with a UNION statement and then using PRINT EXPRESSION ? 

   SELECT a,b,c, 'QUERY1' from xtable UNION

   SELECT a,b,c, 'QUERY2' from xtable UNION

   SELECT a,b,c, 'QUERY3' from xtable 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...