Two query's, one report

Hi,

I'm be construct a report and this report have a parameter which must switch the query. For example:

$P!{tipo_relatorio}.equals("orcamento") ? "query_1" : "query_2"

But a have no idea as resolve this problem.
My report is a list of two distinct situation, so I need this.

Is this possible?

Thanks for anywhere help.

Tiaguinho's picture
389
Joined: Feb 26 2014 - 4:06am
Last seen: 3 years 9 months ago

2 Answers:

Here is a link to a very helpful video on how to implement conditional queries:

 

http://community.jaspersoft.com/blog/how-implement-conditional-query-ireport-using-sample-database-sample-included

 

Good Luck!

M.B.Morgan

mbmorgan's picture
263
Joined: Apr 14 2014 - 11:15am
Last seen: 8 years 10 months ago

Check in using $P!{} . Page 84 in Jaspersoft Studio documentation.

http://community.jaspersoft.com/documentation/jaspersoft-studio-user-guide

 

hozawa's picture
177059
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago
Feedback
randomness