I am using iReport 1.2.7 tool to create jasper reports.
I want to display ' Schedule Date ', ' Engineer Name ' and ' Project ID ' on my report after fetching the details from the database. But I want the Scheduled date to be printed only once for one particular Engineer . Similarly, if an Engineer was involved in multiple projects, its Name should only be printed once, but there should be multiple entries under Project_Id column. Below Diagram will make the scenario clear :
Here, at entry number #1 and #3, Date is only printed once corresponding to that particular engineer and then Engineer Name is printed only once with multiple project IDs . I tried creating a variable which will store the last engineer name or the date field so that we may check if the current name is similar to the last. But can't find a way to point to the last fetched row from database.
Any help or direction in the same is highly appreciated.
Try something like this:
<groupExpression><![CDATA[$F{Scheduled_Date}.toString()+$F{EngineerName}]]></groupExpression>
In the TextFields uncheck "print repeated values" and select your group in "print when group changes".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.