I want to generate fields in my report that match a certain condition, for example:
1. I've got a survey with ID 40
2. I want to select all "question_name" values from table "questions", where "survey_id" = 40
How 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?
1 Answer:
Posted on November 10, 2017 at 7:07am
This could be a starting point: https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-u...
The documentation also provides information about parameters/variables.
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?
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.