daniel.la Posted July 26, 2017 Share Posted July 26, 2017 Hello all.Before I state my issue I just want to provide some information on my specs.I'm using a mysql database as my datasouce and jaspersoft studio community edition v6.3.1.The report I'm creating should have a title page that displays very specific information from the first few rows in my database. For example:idsectionidsectiontextentrytextisnewpage11nullnull021Example CompanyExample Text031Financial ReportQ10Knowing this (and also knowing that the data can change based on user inputs), I wanted to be able to store the value of a specific field into a variable where the id was equal to a certain value.I created a variable and set the Inital Value Expression to this: $F{id}.equals(3) ? $F{sectiontext} : "Nothing"I then placed that variable onto the Title section of the report designer to see what would display when Previewing the report and I only got nullSo with that being said, is it possible to store the value of a field into a variable WHERE the primary key for that row is equal to a certain value? and if so, does that mean the value of the variable does not change so long as the value in the datasource is the same even when the report is in run time?If anyone knows how to implement or even if this is possible, please let me know! thanks 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