Archive for July 2015
Start with iReport :
1.Download and install iReport version 4.6.0
2.Load required .jar file (ex. ojdbc14 driver for oracle database) using below navigation.
From Menu bar: Tools => Options
3.Click on Add Jar Button to load library files.
4. If you do not load Oracle JDBC driver it will show below Error Message.
5. To make database connection go through below image.
7. Select type of data source and click on Next button.
8. Enter required details in given fields and click on Test button.
JDBC Driver: For Oracle Database choose Oracle Driver.
JDBC URL: localhost is the name of the machine where database reside.
Database Port: 1521
Database: XE
9. It will show successful message if you have entered correct information.
Consider below IR report:
I want to highlight only those
rows whose LOB’s value is ERP.
Create dynamic action:
- Name: Highlight based on LOB/Department Column
- Event: After Refresh
- Selection Type: Region
- Region: {select your report region}
- Condition: No Condition
- Action: Execute JavaScript code
- Fire On Page Load: True
- Code:
this.affectedElements.find('table.apexir_WORKSHEET_DATA td[headers="DEPARTMENT_LOB"]').each(function(i){
var lThis=$(this);if(lThis.text()=="ERP"){lThis.parent().children().css({"background-color":"#C0C0C0"});lThis.parent().children().css({"color":"#CC0000"});}
}); var lThis=$(this); if(lThis.text()=="ERP"){ lThis.parent().children().css({"background-color":"#C0C0C0"}); lThis.parent().children().css({"color":"#CC0000"}); }
});
- Selection Type: Region
- Region: {select your report region}
- Result :
Note : You need to modify dynamic action JavaScript part td[headers="Column_Name"] according your report column alias.