There are two groups in the main report. The first is a column from a view. (The formula that produces the column is probably not relevant, but the column is obtained from a comma-delimited field beginning with a comma:
JOIN
teamtrack.ts_selections selectf on InStr(badgir.ts_dialogue_application, ',' || selectf.ts_id
|| ',') > 0;
The second group is a column from another view. Into that group goes a subreport.
Then there is a detail section, and the group 2 footer (suppressed).
Into the group 1 footer (possibly the group 2 footer would have been a better choice?) goes the subreport in question "no_pub"). I placed it in a footer because (as I recall) too much data appeared when I placed it in a detail section.
The record selection criteria for no_pub is:
{VTMTRACK_EXSTREAM_APP.EXSTREAM_APPLICATION} = {?Pm-VTMTRACK.EXSTREAM_APPLICATION} and
{VTMTRACK_EXSTREAM_APP.ITEMTYPE} in "SSR,Internal SSR,Incident,Cub" and
{VTMTRACK_EXSTREAM_APP.STATUS} = "Active"
//Do not compare with list from main report or report will hang up.
I put the comment in there because when I tried to add the condition to compare {@npItemID} with @CompareList (the variable from the main report, surrounded by quotes), the report hung up seemingly forever (I think I waited 1/2 hour before terminating it). Instead, I used the condition as a suppression formula in the subreport detail section:
{@npItemID} = previous ({@npItemID}) or
{@npItemID} in {@CompareList}
@CompareList formula:
'"' + {?Pm-@Concatenate_ItemID_list} + '"'
In the current report, @CompareList =
"CUB10037A,CUB12322B,CUB12322B,"