Conditional report values

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email with questions or issues requiring TIBCO review or response.

Hi all, 

I hope you can help me. Let me explain this bug as well as I can:
1)I have a report sorted by parameters, the primary is the "Owner", the table looks like:


As you can see, there's a "Pool" owner, this owner comes because this condition in Text Field:


2)Clicking any value, they will pass to another report, with some parameters associated to each "Ticket (Creation date, due date, name of owner, description...) This report works perfectly except  when I try to drilldown this "Pool" Owner, when I drilldown it, the reports with details is returning all the repository, I mean, all the "tickets" associated to any owner, and what I want to see is all the "unassigned tickets", which could have the owner name as empty or null or white space...

I have a condition in the Dataset Table report parameter like: 

($P{Owner}==null || $P{Owner}.equals(""))?new String(""): "\"OpnPrps.CurAgtNme\":\""+$P{Owner}+"\","

I'm thinking that maybe the problem is the initial condition $P{Owner}==null || $P{Owner}.equals(""), and this equals("") is not getting correctly all the values but I'm not sure. 

Thanks & kind regards.



alba.ortega's picture
Joined: Feb 25 2015 - 7:08am
Last seen: 6 years 8 months ago

can you please elaborate the question. It is not clear.

AnnMary.Thomas - 7 years 4 months ago


Ok, I will try....

I have the table from Image 1, And when I click in "Pool" value, itdrilldown many details in other table, this drilldown is sorted by this Owner, however, when Pool (Pool means all the null/empty values), the reports is being sorted by any data (all the inventory) but I want to sort them with Owner == null. 

alba.ortega - 7 years 4 months ago

1 Answer:

In SQL this should be

$P{owner} IS NULL

james.t's picture
Joined: Jul 21 2014 - 1:45am
Last seen: 4 years 4 months ago

Thank you, however,I'm using MongoDB, and also is not quite easy, I mean, I need to find a way to configure a conditional param in the subquery of my details in order to get the values I'm searching.

alba.ortega - 7 years 3 months ago