Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress output in a GH

Status
Not open for further replies.

GCL2007

IS-IT--Management
Dec 11, 2007
167
US
I have a situation where I am trying to report a series of fields in a GROUP HEADER. I want to report them vertically as below:
FIELD1NAME FIELD1
FIELD2NAME FIELD2
FIELD3NAME FIELD3
FIELD4NAME FIELD4
etc...

My issue is I only want to display those fields and values where the variable is not null. I do not want to leave a space if FIELD2 is null -
I want the FIELD3 to appear directly below FIELD1 in that case.

Any thoughts on how I could do this? Thanks
 
goto section expert (right click on left side of screen where rh,ph,gh,d are listed) and select suppress box then put in what criteria you want to suppress.

On my report I created a group by invoice # then suppressed the group if Inv$=Pay$, so it only shows invoices with balances.
 
Thanks ehetzel, but I don't want to supress the whole section - I may have 20 different fields displayed one below another. If a field value is null, I want to suppress it's printing and also suppress it's text label - however, I don't want to leave a blank space between the previous field and the next field..
 
You can create a formula like this and format it to "can grow":

(
if isnull({table.fieldname1}) then
"" else
{table.fieldname1}
) & " " &
(
if isnull({table.field1}) then
"" else
totext({table.field1},0,"") //assumes field1 is a number
) & chr(13) &
(
if isnull({table.fieldname2}) then
"" else
{table.fieldname2}
) & " " &
(
if isnull({table.field2}) then
"" else
totext({table.field2},0,"") //assumes field2 is a number
) & chr(13) & //etc.

However, any formula referencing details and placed in the group header will only show the values for the first detail row in the group.

-LB
 
LB,
First of all, thanks a million for all the help...
Had a question - In my situation, {table.fieldname1} is just a text object describing that particular field ({table.field1}).
For example,
FIELD1NAME FIELD1
FIELD1NAME would just be a text description describing FIELD1. If FIELD1 is null, I would like both FIELD1 and FIELD1NAME to not print and also not consume a blank line because my field values will be displayed vertically.
Hope that made sense....
 
Then just change the logic to:

(
if isnull({table.field1}) then
"" else
"Text1 " + totext({table.field1},0,"") //assumes field1 is a number
) & chr(13) &
(
if isnull({table.field2}) then
"" else
"Text2 " + totext({table.field2,0,"") //assumes field2is a number
) & chr(13) & //etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top