Focal Point
Conditional Styling

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

February 27, 2006, 05:14 PM
chelsea
Conditional Styling
Hi,
i am trying to do a drill down report and i am passing the value to the second report from the first report and my drill down is based on the multiple conditions.i am facing problem while doing the styling for this report.
for example
TABLE FILE CAR
PRINT
COUNTRY SALES
BY CAR
ON TABLE HOLD AS H1
END
DEFINE FILE H1
FLAG/I1 = IF COUNTRY EQ 'ENGLAND' OR SALES GT 5000 THEN 1 ELSE 0;
END
TABLE FILE H1
PRINT COUNTRY
SALES
FLAG NOPRINT
BY CAR
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
BORDER-TOP=MEDIUM,
BORDER-BOTTOM=MEDIUM,
BORDER-LEFT=MEDIUM,
BORDER-RIGHT=MEDIUM,
BORDER-COLOR='WHITE',
BACKCOLOR = 'SILVER',
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=TITLE,
COLUMN=N1,
COLOR='WHITE',
BACKCOLOR='MAROON',
FONT='ARIAL',
STYLE=BOLD,
SIZE=11,
$
TYPE=TITLE,
COLUMN=N2,
COLOR='WHITE',
BACKCOLOR='MAROON',
FONT='ARIAL',
SIZE=11,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N3,
COLOR='WHITE',
BACKCOLOR='MAROON',
STYLE=BOLD,
FONT='ARIAL',
SIZE=11,
$
TYPE=TITLE,
COLUMN=N4,
COLOR='WHITE',
BACKCOLOR='MAROON',
STYLE=BOLD,
FONT='ARIAL',
SIZE=11,
$
TYPE=TITLE,
COLUMN=N5,
COLOR='WHITE',
BACKCOLOR='MAROON',
STYLE=BOLD,
FONT='ARIAL',
SIZE=11,
$
TYPE=DATA,
COLUMN = N1,
WHEN=FLAG GT 0,
STYLE=BOLD,
FOCEXEC=app/kk.fex(KIRAN=CAR),
$
ENDSTYLE
END

when you run this report you can drill down the car names(audi,bmw etc.).
MY PROBLEM IS IS THERE ANY WAY I CAN DISPLAY BMW ONCE AND REMOVE THE BLANK LINES UNDER BMW LIKE THE RESULT WE GET WHEN WE DO SORT ON CAR
ANY SUGGESTIONS ARE APPRECIATED.
THANKS
February 27, 2006, 08:49 PM
susannah
chelsea, you have chosen to print 6 records for bmw; if you want only 1 record for bmw then don't PRINT SALES, rather SUM SALES.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 28, 2006, 09:58 AM
chelsea
Thanks Susannah for your reply but i cant use SUM INSTEAD OF PRINT
February 28, 2006, 11:03 AM
reFOCUSing
I'm not understanding what you want to do? Are you wanting to move the car name text, change the color of the blank lines or something else?
February 28, 2006, 11:24 AM
k.lane
Why can't you SUM?

Ken


Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Databases: Oracle 10g, SQL Server 2000, DB2.
February 28, 2006, 11:32 AM
k.lane
After re-reading your post, I'm wondering if this is what you're looking for:

TABLE FILE CAR
LIST
COUNTRY SALES
BY CAR
ON TABLE HOLD AS H1
END
DEFINE FILE H1
FLAG/I1 = IF COUNTRY EQ 'ENGLAND' OR SALES GT 5000 THEN 1 ELSE 0;
END
TABLE FILE H1
PRINT COUNTRY
SALES
FLAG NOPRINT
E02
BY CAR
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
BORDER-TOP=MEDIUM,
BORDER-BOTTOM=MEDIUM,
BORDER-LEFT=MEDIUM,
BORDER-RIGHT=MEDIUM,
BORDER-COLOR='WHITE',
BACKCOLOR = 'SILVER',
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=TITLE,
COLUMN=N1,
COLOR='WHITE',
BACKCOLOR='MAROON',
FONT='ARIAL',
STYLE=BOLD,
SIZE=11,
$
TYPE=TITLE,
COLUMN=N2,
COLOR='WHITE',
BACKCOLOR='MAROON',
FONT='ARIAL',
SIZE=11,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N3,
COLOR='WHITE',
BACKCOLOR='MAROON',
STYLE=BOLD,
FONT='ARIAL',
SIZE=11,
$
TYPE=TITLE,
COLUMN=N4,
COLOR='WHITE',
BACKCOLOR='MAROON',
STYLE=BOLD,
FONT='ARIAL',
SIZE=11,
$
TYPE=TITLE,
COLUMN=N5,
COLOR='WHITE',
BACKCOLOR='MAROON',
STYLE=BOLD,
FONT='ARIAL',
SIZE=11,
$
TYPE=DATA,
COLUMN = N1,
WHEN=FLAG GT 0,
STYLE=BOLD,
FOCEXEC=app/kk.fex(KIRAN=CAR),
$
TYPE=DATA, COLUMN=N1,
BACKCOLOR=NONE, WHEN=E02 GT 1, $
ENDSTYLE
END

What this does is to remove the backcolor of maroon on repeating cars. Is this what you mean by 'removing the blank lines under BMW'?

If so, then I changed the PRINT at the top to a LIST which creates a new column in the HOLD file H1. Refer to this column as E02 when printing (of course you can NOPRINT it). In the stylesheet, use E02 as well.

Ken


Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE
Databases: Oracle 10g, SQL Server 2000, DB2.
March 01, 2006, 03:40 PM
chelsea
THANKS K.LANE FOR HELP AND THAT IS EXACTLY THE WAY I WANTED AND THANK YOU EVERYBODY FOR YOUR HELP