Focal Point
color=white trick for fields you don't want to display

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

June 14, 2006, 03:51 PM
Pam Kratt
color=white trick for fields you don't want to display
I occasionally use the white out trick where we white out a field we don't want to display.

i.e.
TYPE=DATA, SIZE=8, COLUMN=CARRY_VL,COLOR=WHITE,
WHEN=DISPFEDTAXFLAG EQ 'N', $

We found out today that when you go to print html (or print preview), those fields that are "whited" out actual print out on the report. Has anyone found a work around for this? I'm hoping I don't have to try and blank out all the numeric fields they don't want to see.

Thanks.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
June 14, 2006, 04:16 PM
Jim_at_LM
Have you tried:

BACKCOLOR=RGB(255 255 255),
COLOR= RGB(255 255 255),

(White on White) - not sure what output you'll get.


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
June 14, 2006, 04:34 PM
Pam Kratt
same results. It still shows when printing, but it does not show if you just have it up on your screen.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
June 14, 2006, 05:08 PM
Tony A
Pam,

Try setting the font size as small as you can so that even if it does print, it will just be an obscure mark on the paper.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 14, 2006, 05:22 PM
Prarie
Guess it could work for HTML

IBI says:
You cannot
use Conditional Styling to hide the Column based on a color (white). This
is because Excel will still recognize the column as having data, and
the Grid Lines will still surround that column.

What needs to be done is to utilize two TABLE requests where the first one
establishes the condition which is saved to a HOLD file. Then, using a
-READ, capture that value to an Amper Variable. That Amper Variable is
then used within a -SET with another condition. That condition is then used
within the second TABLE request to screen out the column if that condition is
met.

Example:

TABLE FILE CAR
PRINT COUNTRY
WHERE DEALER_COST EQ 6000
ON TABLE HOLD
END
-RUN
-READ HOLD &CNTRY2.A12.
-SET &NOP = IF &CNTRY2 EQ 'W GERMANY' THEN 'NOPRINT' ELSE ' ';

TABLE FILE CAR
PRINT DEALER_COST CAR MODEL &NOP
RETAIL_COST
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
END


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Thanks Tony - we'll try it here too. Smiler


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
For HTML display/print only, in order to hide columns, I prefer use CSS styles.

In the following example:

- Browser don't show SALES when COUNTRY EQ ITALY.
(class nodisplay with visibility css property set to "hidden")

- DCOST & RCOST columns are not displayed on printer.
(class noprint with display css property set to "none" when media is printer)

TABLE FILE CAR
  SUM SALES DCOST RCOST
  BY COUNTRY
  ON TABLE HOLD FORMAT HTMTABLE
  ON TABLE SET STYLE *
    TYPE=DATA,  COLUMN=SALES, CLASS=nodisplay, WHEN=COUNTRY EQ 'ITALY', $
    TYPE=TITLE, COLUMN=DCOST, CLASS=noprint, $
    TYPE=TITLE, COLUMN=RCOST, CLASS=noprint, $
    TYPE=DATA,  COLUMN=DCOST, CLASS=noprint, $
    TYPE=DATA,  COLUMN=RCOST, CLASS=noprint, $
END
-RUN

-HTMLFORM BEGIN
<style type="text/css">
  .nodisplay {visibility: hidden;}
  @media print {
    .noprint {display: none}
  }
}
</style>
!IBI.FIL.HOLD;
-HTMLFORM END

Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
I love the suggestion of:


It worked great. Thanks.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
Pam, each users' browser settings determine whether 'print background colors and images' get displayed. if that switch is off, then you print black and white.
if that switch is on, then you get the nice invisible white font. But it is user-desktop-specific. Tools/Internet Options/Advanced..and scroll down;




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Tell me why cannot you use NOPRINT?




Scott

We can't do noprint because we need the field to print normally. It's only when a certain row is printed that they don't want to see the amounts in one column. Noprint would cause the column to never print. They want to see 9 out of 10 rows and some accounts may not even have that 1 row of data that they don't want. Of course, they want to see some of the columns for that 1 row, so you can't eliminate the data completely.

The solution of class=nodisplay suggested by Mikel worked great.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
applause, Mikel.
what a really neat trick.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
If you can determine what row it should and should not print on could you not set the computed field to missing and before the report runs set SET NODATA = ''.




Scott