Small knowledge, big challenge! This paper is participating in theEssentials for programmers”Creative activities.
The result of the previous article is this
Next, we will create a new field inside the Fields.
Fields: Fields generated by the associated database or entity class. We can manage backend entity classes, and we can associate databases. I’m associating entity classes here. The entity class code will be released later
The method for creating Fields is the same as the method for creating Parameters, which I won’t go into here.
After Fields is built
Create a new Static Text and modify the Text
I’m creating a new Static Text inside the Column Header. Instead, I now use the entity box. I select the box and modify the Borders property in Properties
In the Detail 1 area, create a new Text field. After creating a new Field, double click the popup box and select the value in the newly created Field. Choose the values you want. $F{index} $F{index
I’m only showing $F here because the box is too narrow
All the same, follow the same pattern
If you want to import another report within this report, what should you do? Create a new report, JRXML, that looks like this
Then go back to demo.jrxml (I changed the name to cabinet.jrxml for the task)
Open up that report
I imported the cabinet_footer. JRXML report in the Summary area. (INITIALLY, I didn’t pay much attention to Summary, so I could do it in the Column Footer area. Drag the Subreport to the Summary area
Select an existing report whose parameter name has been created before. (If selected, does the software already know which report TO import? I don’t know. Specific operations, or in the background to achieve)
The whole report has been made
Previous operations were completed in design, we can see the source code in Source, and we can see the effect in Preview
Enter the value to browse
Click “Run the Report” to see the results
So this is the effect
In the next article, we’ll look at the back and forth code, and we’ll talk about how to do that in Java projects