It's all about the answers!

Ask a question

BIRT Report - hide work item if has not a link type children to a other work item


Gustavo Leyva (3345) | asked Feb 28 '13, 11:31 p.m.
 Hi,

I am trying to create a BIRT report in two phases:

First phase: 
BIRT report that displays Work Items with a link type children to other work items. Should not show a work item if has not a link to other work item.
I am created a report where I can show work items with a children work item, nevertheles I also show all work items without a child.
I created the report based on:
http://www.ibm.com/developerworks/rational/library/10/creatingcustomreportswithbirtandrtc-part2/index.html - "Retrieving linked items with nested tables"

Second phase:
Show only the work items with all of the child work items resolved.

Thanks in advance.

Regards,
Gustavo Leyva.

One answer



permanent link
Gustavo Leyva (3345) | answered Mar 30 '13, 4:05 p.m.
To hide records without a child:

Based on the mentioned report "Retrieving linked items with nested tables", I added a column at the same level of the "Child Report" and add a "Parent Report", this will show only the Work Items Parent with one or more Childs, nevertheless will show duplicated rows if there is more than one child.

Structure of the report
To hide the duplicated rows, I based on the following tutorial:

Second phase: Show only the work items with all of the child work items resolved:

Parent WI Report - Select the row:

JavaScript Code - OnRender

Script - OnReder:
var curr = this.getRowData().getColumnValue("WI_ID");
var mymap = reportContext.getPersistentGlobalVariable(curr);
this.getStyle().display = mymap;
		
		
Child WI Report - Select the row:
Child WI Report
	
	
Script - onCreate
var wi_idhasdetails = this.getRowData().getExpressionValue("row._outer._outer[\"WI_ID\"]");
var row2 = this.getRowData().getColumnValue("RESOLUTION_DATE");
if(row2!=null && row2 != ""){
   var tempWiDet = reportContext.getPersistentGlobalVariable(wi_idhasdetails);
   if(typeof tempWiDet == 'undefined'  || tempWiDet != "none"){
    reportContext.setPersistentGlobalVariable(wi_idhasdetails, "block");
   }
}else{
     reportContext.setPersistentGlobalVariable(wi_idhasdetails, "none");
}
		
		
This works on Web Viewer, not in HTML View.

Thanks to Jason Weathersby.

Regards,
Gustavo Leyva.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.