Focal Point
Suppress printing of blank detail lines.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6921098331

August 25, 2005, 05:06 PM
Lenny Ward
Suppress printing of blank detail lines.
I have a report that I want to print some of the detail lines but not all. But I want all detail added into the totals. I am using a SUBFOOT to display the detail lines I want. The problem is that I'm getting a blank line for all detail lines from the detail section. I have a NOPRINT for all the detail columns.
Can someone show me how to suppress the blank lines.
I am running 5.2 and 7.0 of WebFOCUS on NT.

You have to change the [] to parenthesis on my WHEN statement in order to run code. I kept getting errors about the parenthesis when I tried to post.

Thanks,

Lenny


TABLE FILE CAR
PRINT MODEL NOPRINT
DEALER NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
HEADING
"Car<+1>Model<+1>Price"
" "
ON CAR RECAP
TOTAL_DEALER=DEALER;
ON MODEL SUBFOOT
" <CAR <MODEL <DEALER "
-* change [] to parenthesis here
WHEN [MODEL CONTAINS '4 DOOR'];
ON CAR SUBFOOT
"Total for <CAR <TOTAL_DEALER"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, STYLE=BOLD, SIZE=9, $
TYPE=HEADING, STYLE=BOLD, SIZE=10, LINE=1, OBJECT=TEXT, ITEM=1, POSITION=0.00,$
TYPE=HEADING, STYLE=BOLD, SIZE=10, LINE=1, OBJECT=TEXT, ITEM=2, POSITION=1.50,$
TYPE=HEADING, STYLE=BOLD, SIZE=10, LINE=1, OBJECT=TEXT, ITEM=3, POSITION=3.00,$
TYPE=SUBFOOT, BY=B1, OBJECT=FIELD, ITEM=1, POSITION=1.25, $
TYPE=SUBFOOT, BY=B1, OBJECT=FIELD, ITEM=2, POSITION=2.50, $
TYPE=SUBFOOT, BY=B2, OBJECT=FIELD, ITEM=1, POSITION=0.00, $
TYPE=SUBFOOT, BY=B2, OBJECT=FIELD, ITEM=2, POSITION=1.50, $
TYPE=SUBFOOT, BY=B2, OBJECT=FIELD, ITEM=3, POSITION=3.00, $
ENDSTYLE
END
August 25, 2005, 06:01 PM
reFOCUSing
I hate to tell you there is no way to suppress the line being created by the PRINT. The blank line is part of the internal matrix. But there are work arounds. (I ran into this problem)

There are two ways I know how to get around it.
1) You will need to hold your data as format WP and then create a MAS file on the hold file. From this point you can remove the blank lines.

2) Convert your numerical data into alphanumerical data using the PTOA or FTOA function. This will allow you to display the data like normal. (This is the solution I did)

I will try to find you an example of using the PTOA/FTOA.
August 25, 2005, 07:10 PM
Lenny Ward
I found a way that worked fairly well.

I changed the font size for my detail lines to:

TYPE=REPORT, SIZE=1, $

This took most of the white space out between the lines. It would be better if you could just suppress the blank lines.

Lenny
August 25, 2005, 08:25 PM
mgrackin
I'm not quite sure I understand the problem because I looked at the example you included and it looks like you are headed in the right direction to accomplish this. I would use the WHEN clause on the SUBFOOT just like you show in your example. Even if the SUBFOOT line does not appear because of a blank detail line, the values should still be included in your total.

Can you give us a better example or explain a little more the problem you are encountering?
August 26, 2005, 11:23 AM
Lenny Ward
The problem is even though you have a NOPRINT on all the items on detail line WF still prints the detail lines even though they are blank. When the report prints you get big holes in the report where the blank lines are. Reducing the font size to 1 for the detail lines helps but the report still doesn't look right.

Lenny
August 26, 2005, 01:32 PM
mgrackin
AH! I didn't run your code before but now I see the problem. I believe I ran into this issue myself before and did the same thing (set font size to 1) but I can't seem to find the FEX in which I did this. Thanks for the clarification.
August 26, 2005, 10:09 PM
<toby mills>
Hey Lenny

I was thinking the same thing as was already mentioned about running it out to a flat file and making a master to read that, then print it but leave out the blank lines....

The last thought I'd have for you on this is to use FRL (or FMR or EMR or whatever we're calling it these days) for this report.

-Toby