A Subreport section suppress formula was not working with the first record, although the formula did work for a record further down. Someone suggested checking the Suppress checkbox, and that worked. Is there an explanation?
If the value in the suppression formula as of the first record is null, the suppression formula does not execute and defaults to the value of the checkbox. So in this case, you are saying suppress the record if the suppression condition does not execute--this might not be what you want to happen in every case.
The following formula also doesn't work, even though all the conditions seem to be true; nor does the same formula work as a suppression formula for any of the detail report fields:
{@npItemID} = previous ({@npItemID}) or
{@npItemID} in {@CompareList}
or {@npItemID} = "CUB10037A"
or recordNumber = 1
You need to identify the location of the subreport and also show the content of all formulas including nested formulas. It is also unclear whether you are trying to suppress a main report section based on subreport results or just a section within the subreport.
The subreport is located in Group Footer #1a, although only Group Header #1 currently exists. I had tried placing the subreport in a detail section of the main report, but as I recall, there were too many records. (I don't know whether placing the subreport in Group Footer #2 would change anything.)
I'm trying to suppress just a section within the subreport.
Formulas and nested formulas in subreport detail section:
--------------------------------------------------------
Subreport section suppression formula:
{@npItemID} = previous ({@npItemID}) or
{@npItemID} in {@CompareList}
{@npItemID}:
if {VTMTRACK_EXSTREAM_APP.ITEMTYPE} = "Cub" then
{@npItemTypeDesc} + {VTMTRACK_EXSTREAM_APP.ISSUEID} + {VTMTRACK_EXSTREAM_APP.ID_SUFFIX}
else
{@npItemTypeDesc} + {VTMTRACK_EXSTREAM_APP.ISSUEID}
{@npItemTypeDesc}:
select {VTMTRACK_EXSTREAM_APP.ITEMTYPE}
case 'Cub' : "CUB"
case 'Incident' : "INC"
case 'Internal SSR' : "ISSR"
case 'SSR' : "SSR"
case 'ImageRight SSR' : "SSR"
case 'ImageRight Work Request' : "WR "
case 'ImageRight Cub' : "CUB"
case 'Work Request' : "WR "
Please explain what you are grouping on in the main report and how the sub is linked to the main report (show the sub selection formula). Note that the placement of a sub should be based on the report logic, not on the number of records returned.
Are you trying to suppress a detail section in the main report?
Can you describe what the main and subreports are intended to do? We don't have context or enough info here.
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:
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}
Thank you! That worked; I was able to uncheck the Suppress box using the modified formula. However, I don't understand why the first record would not be suppressed on account of the itemid being found in CompareList, independent of the first condition.
Crystal formulae do not like NULLs. As soon as they are encountered the formula fails. If there is ever a possibility that your formula will return a null make sure that you deal with that condition first.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.