manuatilomb Posted March 27, 2015 Share Posted March 27, 2015 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" Link to comment Share on other sites More sharing options...
tchen Posted March 27, 2015 Share Posted March 27, 2015 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}[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now