Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

 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.

0 votes



One answer

Permanent link
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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 324

Question asked: Feb 28 '13, 11:31 p.m.

Question was seen: 7,356 times

Last updated: Mar 30 '13, 4:05 p.m.

Confirmation Cancel Confirm