Taking a single value from the REPORT_DATA_SOURCE

0

I'm in this situation: I have a subreport that has a graph that is filled with a set of values that are generated by an application. The application is configured to consume data from a database according to a period of time, and in case that a certain period doesn't have any values (for example, for a specific day or for a specific hour), it will generate a empty one, with the date only. The thing is that I have a column in one of this files that has a value that I use in the title of the subreport, and when the first date is one of this dummy dates, instead of taking the value I need from the column, what I get is the dummy value of that dummy first row.

So my question: Is there anyway to look in the dataset for a specific value? The dummy value is the same always (0), and I was thinking about setting a variable with a expression that would bring the value that I need (something like "if <field> doesn't equals to 0, then print the name"

manuatilomb's picture
Joined: Mar 5 2015 - 8:57am
Last seen: 1 year 12 months ago

1 Answer:

0

Use can use the folloiwng ternary operator as text field expression in the title section of your sub report:

$F{date_column}==0?"print default name":$F{value_column}

tchen's picture
44069
Joined: Feb 27 2008 - 7:33am
Last seen: 2 weeks 2 days ago
Feedback
randomness