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.
|
One answer
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.
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:
Script - OnReder:
Child WI Report - Select the row:var curr = this.getRowData().getColumnValue("WI_ID"); var mymap = reportContext.getPersistentGlobalVariable(curr); this.getStyle().display = mymap; Script - onCreate This works on Web Viewer, not in HTML View.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"); }
Thanks to Jason Weathersby.
Regards,
Gustavo Leyva.
|
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.