jack w. Posted November 10, 2017 Share Posted November 10, 2017 I want to generate fields in my report that match a certain condition, for example:1. I've got a survey with ID 402. I want to select all "question_name" values from table "questions", where "survey_id" = 40How can I do that? I assume that my "question_name" values are fields I need to display in my Detail band, but where do I put the SQL query that will enable me to do so? Do I use parameters/variable for this? Link to comment Share on other sites More sharing options...
narcism Posted November 10, 2017 Share Posted November 10, 2017 This could be a starting point: https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v640/registration-fields-sql-queryThe documentation also provides information about parameters/variables. Link to comment Share on other sites More sharing options...
jack w. Posted November 10, 2017 Author Share Posted November 10, 2017 Hi narcism, thanks for an answer.I've already read this article and tried to create a field this way, but after I click "OK" nothing happens. So, after following the instructions, I suppose I have "registered" the field. But why doesn't it appear in the Fields list? How am I supposed to use it in my report? Link to comment Share on other sites More sharing options...
narcism Posted November 13, 2017 Share Posted November 13, 2017 Maybe you are getting an error on the Dataset and Query Dialog that prevents you from reading the fields. You need to check the top left corner of the dialog for errors after pressing the "Read Fields" button. 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