As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi, We have developed a report but we have a slight cosmetic issue where the last vertical border in our html report does not show up. We are using WF 7.7.03 on AIX 6.1 64 bit OS and using IE browser v8.06 on Win XP.
Can anyone tell me if it is possible to show that last vertical line in the border at the top right hand corner of the report?
Thank you in advance.
Here is our code: -SET &VERSION_NUMBER = 'v1'; -* -* results in a variable named &SERVER_NAME = DEV, TEST, PRDC, or PROD -MRNOEDIT -INCLUDE SERVERID -* -SET &ECHO=ALL; -* SET HOLDLIST = PRINTONLY SET PRINTPLUS = ON SET CENT-ZERO = ON SET SHOWBLANKS= ON SET ASNAMES = ON SET NODATA = '0'
-SET &IS_SUBTOTAL = 'Y';
-SET &RPT_APP_ID = 'VRAI'; -SET &RPT_NAME = 'ARIS - Volume and Revenue Auto Insurance Industry Report'; -SET &RUN_DATE = &DATEMtrDYY; -SET &RUN_DATE = TRUNCATE(&RUN_DATE); -SET &RUN_TIME = EDIT(HHMMSS('A8'),'99$:99$:99');
-SET &RPT_FOOT = - IF (&OUTPUT EQ 'HTML') - THEN 'Report ID: &RPT_APP_ID.EVAL &VERSION_NUMBER.EVAL&SERVER_NAME_SHORT.EVAL User ID: &MTO_USER.EVAL Date: &RUN_DATE.EVAL Time: &RUN_TIME.EVAL' - ELSE IF (&OUTPUT EQ 'EXL2K') - THEN 'Report ID: &RPT_APP_ID.EVAL &VERSION_NUMBER.EVAL&SERVER_NAME_SHORT.EVAL User ID: &MTO_USER.EVAL Date: &RUN_DATE.EVAL Time: &RUN_TIME.EVAL' - ELSE IF (&OUTPUT EQ 'PDF') - THEN ' <1> Report ID: &RPT_APP_ID.EVAL &VERSION_NUMBER.EVAL&SERVER_NAME_SHORT.EVAL <23> User ID: &MTO_USER.EVAL <55> Date: &RUN_DATE.EVAL <80> Time: &RUN_TIME.EVAL <100>Page: <-3- ELSE '';
-SET &HLINE = IF (&OUTPUT EQ 'HTML' OR 'PDF') THEN "" ELSE FOC_NONE; -SET &HLINE2= IF (&OUTPUT EQ 'HTML') THEN "" ELSE FOC_NONE; -* -SET &LAYOUT_HEAD = IF (&OUTPUT EQ 'HTML' OR 'EXL2K') THEN 'ON TABLE SUBHEAD' ELSE 'HEADING'; -SET &LAYOUT_FOOT = IF (&OUTPUT EQ 'HTML' OR 'EXL2K') THEN 'ON TABLE SUBFOOT' ELSE 'FOOTING BOTTOM'; -SET &AGR_TYPE = 'Auto Ins Co - Sub-client'; -* 'Auto Ins Co - Sub-client' 'Auto Ins Broker - Sub-client' 'Auto Ins Co - Direct' 'Auto Ins Broker - Direct' -SET &AGR_CODE = '32'; -* 32 33 34 35 -* 'Auto Ins Broker - Direct' '35' -* 'Auto Ins Co - Direct' '34' -* 'Auto Ins Co - Sub-client' '32' -* 'Auto Ins Broker - Sub-client' '33' -DEFAULT &MTOUSER = ''; -SET &MTOUSER = &MTO_USER; -* -*-------------------------------------------------------------------------------- -* ----- START OF SQL QUERY PREPARATION --- -*-------------------------------------------------------------------------------- -* -*-INCLUDE sqlrus_arisread.fex -INCLUDE sqldw_aris.fex -* SQL SELECT AI.AGREEMENT_CODE, AI.AGREEMENT_TYPE, (CASE WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'INDIRECT' THEN 'Auto Insurance Reseller' WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '34' THEN ' ' WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '35' THEN ' ' ELSE 'Other' END) AS ISSUBCLIENT, AI.PRODUCT_CATEGORY, NVL(PS.PRODUCT_CATEGORY_SORT,CASE WHEN AI.PRODUCT_CATEGORY ='DRIVER' THEN 1 WHEN AI.PRODUCT_CATEGORY ='VEHICLE' THEN 2 WHEN AI.PRODUCT_CATEGORY ='CARRIER' THEN 3 ELSE 4 END) AS PRODUCT_CATEGORY_SORT, AI.PRODUCT_CODE || ' - ' ||AI.PRODUCT_NAME AS PRODUCT_NAME, NVL(PS.PRODUCT_CODE_SORT,1000) AS PRODUCT_CODE_SORT, SUM(AI.ORDER_QTY) AS VOLUME, SUM(AI.UNIT_PRICE_AMT) AS REVENUE FROM ARIS_OWNER.AUTO_INS_VOL_REV AI LEFT OUTER JOIN ARIS_OWNER.RPT_PRODUCT_SORT PS ON AI.PRODUCT_CATEGORY = PS.PRODUCT_CATEGORY AND AI.PRODUCT_CODE = PS.PRODUCT_CODE WHERE AI.TRANSACTION_DATE BETWEEN TO_DATE('&DT_FILTER1 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_DATE('&DT_FILTER2 23:59:59','YYYY-MM-DD HH24:MI:SS') GROUP BY AI.AGREEMENT_CODE, AI.AGREEMENT_TYPE, (CASE WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'INDIRECT' THEN 'Auto Insurance Reseller' WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '34' THEN ' ' WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '35' THEN ' ' ELSE 'Other' END), AI.PRODUCT_CATEGORY, NVL(PS.PRODUCT_CATEGORY_SORT,CASE WHEN AI.PRODUCT_CATEGORY ='DRIVER' THEN 1 WHEN AI.PRODUCT_CATEGORY ='VEHICLE' THEN 2 WHEN AI.PRODUCT_CATEGORY ='CARRIER' THEN 3 ELSE 4 END), AI.PRODUCT_CODE || ' - ' ||AI.PRODUCT_NAME, PS.PRODUCT_CODE_SORT; TABLE ON TABLE HOLD AS SQLOUT END -* -* -IF (&LINES EQ 0) OR (&FOCERRNUM NE 0) GOTO NO_DATA; -*
SQL SELECT (CASE WHEN NVL(C.PRODUCT_CATEGORY_CNT,1) = 1 THEN 'N' WHEN C.PRODUCT_CATEGORY_CNT > 1 AND (DR_SUB = 0 AND VH_SUB = 0 AND CR_SUB = 0) THEN 'N' ELSE 'Y' END) AS ACCROSS_SUB_TOTAL FROM (SELECT SUM (CASE WHEN B.PRODUCT_CATEGORY = 'DRIVER' AND B.PRODUCT_CNT >1 THEN 1 ELSE 0 END) AS DR_SUB, SUM (CASE WHEN B.PRODUCT_CATEGORY = 'VEHICLE' AND B.PRODUCT_CNT >1 THEN 1 ELSE 0 END) AS VH_SUB, SUM(CASE WHEN B.PRODUCT_CATEGORY = 'CARRIER' AND B.PRODUCT_CNT >1 THEN 1 ELSE 0 END) AS CR_SUB, SUM(B.PRODUCT_CATEGORY_CNT) AS PRODUCT_CATEGORY_CNT FROM (SELECT AI.PRODUCT_CATEGORY, COUNT(DISTINCT AI.PRODUCT_CODE) AS PRODUCT_CNT, 1 AS PRODUCT_CATEGORY_CNT FROM ARIS_OWNER.AUTO_INS_VOL_REV AI WHERE AI.TRANSACTION_DATE BETWEEN TO_DATE('&DT_FILTER1 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_DATE('&DT_FILTER2 23:59:59','YYYY-MM-DD HH24:MI:SS') GROUP BY AI.PRODUCT_CATEGORY) B ) C; TABLE ON TABLE HOLD AS IS_SUBTOTAL END -RUN
-READ IS_SUBTOTAL &IS_SUBTOTAL.A1.
-* DEFINE FILE SQLOUT BLA/A1=' '; END -* TABLE FILE SQLOUT SUM VOLUME/D7 AS 'Volume' REVENUE/D10.2 AS 'Revenue' BY HIGHEST ISSUBCLIENT AS '' BY BLA AS '' NOPRINT SUBTOTAL AS 'Sub-Total' MULTILINES BY AGREEMENT_TYPE AS 'Agreement Type' BY AGREEMENT_CODE NOPRINT ACROSS LOWEST PRODUCT_CATEGORY_SORT NOPRINT -IF &IS_SUBTOTAL EQ 'N' THEN GOTO NO_SUBTOTAL; ACROSS PRODUCT_CATEGORY AS '' SUBTOTAL AS 'Sub-Total(PC)' -* produces row Sub-Total without border -GOTO ISSUBTOTAL -NO_SUBTOTAL ACROSS PRODUCT_CATEGORY AS 'YY' -ISSUBTOTAL ACROSS LOWEST PRODUCT_CODE_SORT NOPRINT ACROSS PRODUCT_NAME AS '' -* produce row with border -* -* &LAYOUT_HEAD
"Management Information System" &HLINE "&RPT_NAME" &HLINE "From: &DT_FILTER1 To: &DT_FILTER2" " " &HLINE2
&LAYOUT_FOOT
&HLINE "&RPT_FOOT.EVAL" ON TABLE ROW-TOTAL AS 'Totals for Agreement Type/Sub-Client' ON TABLE COLUMN-TOTAL AS 'GRAND TOTAL' ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT '&OUTPUT' ON TABLE SET HTMLCSS ON ON TABLE SET CSSURL '/wf76/approot/mtomis/report.css' ON TABLE SET EMPTYCELLS OFF ON TABLE SET LINES 999999 ON TABLE SET STYLE * -* -* -GOTO STY_&OUTPUT.EVAL1 -* -* -* ************************************** -* HTML Output Format Definition -* ************************************** -STY_HTML1 -* TYPE = REPORT, GRID=ON, SIZE=8, JUSTIFY=RIGHT, ORIENTATION='LANDSCAPE', BORDER=LIGHT, $ TYPE = TABHEADING, SIZE=10, JUSTIFY=CENTER, COLOR=BLACK, $ TYPE = TABHEADING, LINE=1, SIZE=10, STYLE=BOLD, $ TYPE = TABHEADING, LINE=2, SIZE=3, $ TYPE = TABHEADING, LINE=3, SIZE=11, STYLE=BOLD, COLOR=RGB(0 32 120), $ TYPE = TABHEADING, LINE=4, SIZE=3, $ TYPE = TABHEADING, LINE=5, SIZE=9, STYLE=BOLD, $ TYPE = TABHEADING, LINE=6, SIZE=8, STYLE=BOLD, $ TYPE = TABHEADING, LINE=7, SIZE=8, STYLE=BOLD, $ TYPE = TABHEADING, LINE=8, SIZE=3, $ TYPE = REPORT, COLUMN=AGREEMENT_TYPE, WRAP=2.0, JUSTIFY=CENTER, $ TYPE = ACROSSVALUE, ACROSS=PRODUCT_CATEGORY,STYLE=BOLD,JUSTIFY=CENTER, BACKCOLOR=rgb(228 225 232), $ TYPE = ACROSSVALUE, ACROSS=PRODUCT_NAME, JUSTIFY=CENTER, BACKCOLOR=rgb(218 225 232), $ TYPE = TITLE, JUSTIFY=CENTER, BACKCOLOR=rgb(188 225 232),$ TYPE = GRANDTOTAL, BACKCOLOR=RGB(220 220 220), SIZE=8, STYLE=BOLD, $ TYPE = SUBTOTAL, SIZE=8, STYLE=BOLD, BACKCOLOR=RGB(235 235 235), $ -*TYPE = REPORT, ACROSS=PRODUCT_CATEGORY, BORDER=LIGHT, $ ------------------------------- -*TYPE = REPORT, COLUMN=PRODUCT_CODE_SORT, BORDER=LIGHT, $ ----------------------------------------------- TYPE = TABFOOTING, SIZE=8, JUSTIFY=LEFT, $ TYPE = DATA,COLUMN=P1, STYLE=BOLD, $ TYPE = DATA,COLUMN=P2,TARGET='_blank', FOCEXEC=app/ar_ai_vol_rev_dd.fex(AGR_TYPE=AGREEMENT_TYPE AGR_CODE=AGREEMENT_CODE DT_FILTER1='&DT_FILTER1' DT_FILTER2='&DT_FILTER2' MTOUSER='&MTO_USER' OUTPUT='&OUTPUT' ), $ -* -GOTO STY_END1 -* -* -* ************************************** -* Excel Output Format Definition -* ************************************** -STY_EXL2K1 -* UNITS=IN, GAPINTERNAL=ON, PAGESIZE='LETTER', ORIENTATION='LANDSCAPE', $ TYPE=REPORT, GRID=ON, SIZE=10, SQUEEZE=ON, JUSTIFY=RIGHT, titletext='&RPT_NAME', $ TYPE=TABHEADING, SIZE=10, JUSTIFY=CENTER, COLOR=BLACK, $ TYPE=TABHEADING, LINE=1, SIZE=10, STYLE=BOLD, $ TYPE=TABHEADING, LINE=2, SIZE=11, STYLE=BOLD, COLOR=RGB(0 32 120), $ TYPE=TABHEADING, LINE=3, SIZE=8, STYLE=BOLD, $ TYPE=TABHEADING, LINE=4, SIZE=8, STYLE=BOLD, $ TYPE=TABHEADING, LINE=5, SIZE=8, STYLE=BOLD, $ TYPE=REPORT,COLUMN=P1,SQUEEZE=1.5, JUSTIFY=LEFT, $ TYPE=REPORT, COLUMN=AGREEMENT_TYPE, WRAP=2.0, JUSTIFY=LEFT, STYLE=BOLD, BORDER=0, $ TYPE=ACROSSVALUE, ACROSS=PRODUCT_CATEGORY, STYLE=BOLD, JUSTIFY=CENTER, BORDER=0, BACKCOLOR=rgb(228 225 232), $ TYPE=ACROSSVALUE, ACROSS=PRODUCT_NAME, STYLE=NORMAL, BORDER=0, BACKCOLOR=rgb(218 225 232), $ TYPE=TITLE, JUSTIFY=CENTER, BACKCOLOR=rgb(228 225 232), $ TYPE=SUBTOTAL, JUSTIFY=RIGHT, $ TYPE=GRANDTOTAL, BACKCOLOR=RGB(235 235 235), $ TYPE=TABFOOTING, SIZE=8, JUSTIFY=LEFT, $ TYPE=DATA,COLUMN=P1, STYLE=BOLD, $ TYPE=DATA,COLUMN=P2,TARGET='_blank', FOCEXEC=app/ar_ai_vol_rev_dd.fex(AGR_TYPE=AGREEMENT_TYPE AGR_CODE=AGREEMENT_CODE DT_FILTER1='&DT_FILTER1' DT_FILTER2='&DT_FILTER2' MTOUSER='&MTO_USER' OUTPUT='&OUTPUT' ), $ -* -* -GOTO STY_END1 -* -* -STY_END1 ENDSTYLE END -* -* -IF (&LINES GT 0) AND (&FOCERRNUM EQ 0) THEN GOTO REPORT_END ELSE GOTO NO_DATA; -* -* -************************************************************************** -* if no records found or error happens, display message -************************************************************************** -NO_DATA -* -* -MRNOEDIT -INCLUDE MISI2003.fex -* -* -REPORT_END
This message has been edited. Last edited by: <Kathryn Henning>,
Adrian, it's best to post reproducible code so we can try it out.
Here's some code based on your post, and I get all borders (in v7.7.05). Try it in your environment, and/or update my code to illustrate the problem (and always put your code between
[code]
YOUR CODE HERE
[/code]
tags, use the </> button).
SET HOLDLIST = PRINTONLY
SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET SHOWBLANKS= ON
SET ASNAMES = ON
SET NODATA = '0'
DEFINE FILE CAR
BLA/A1=' ';
END
TABLE FILE CAR
SUM
SALES/D7 AS 'VOLUME'
WEIGHT/D10.2 AS 'REVENUE'
BY HIGHEST COUNTRY AS ''
BY BLA AS '' NOPRINT
SUBTOTAL AS 'SUB-TOTAL' MULTILINES
BY MODEL AS 'AGREEMENT TYPE'
ACROSS LOWEST SEATS NOPRINT
ACROSS WHEELS AS '' SUBTOTAL AS 'SUB-TOTAL(PC)' -* PRODUCES ROW SUB-TOTAL WITHOUT BORDER
ON TABLE ROW-TOTAL AS 'TOTALS FOR AGREEMENT TYPE/SUB-CLIENT'
ON TABLE COLUMN-TOTAL AS 'GRAND TOTAL'
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT 'HTML'
ON TABLE SET HTMLCSS ON
ON TABLE SET EMPTYCELLS OFF
ON TABLE SET LINES 999999
ON TABLE SET STYLE *
TYPE = REPORT, GRID=ON, SIZE=8, JUSTIFY=RIGHT, ORIENTATION='LANDSCAPE', BORDER=LIGHT, $
TYPE = TABHEADING, SIZE=10, JUSTIFY=CENTER, COLOR=BLACK, $
TYPE = TABHEADING, LINE=1, SIZE=10, STYLE=BOLD, $
TYPE = TABHEADING, LINE=2, SIZE=3, $
TYPE = TABHEADING, LINE=3, SIZE=11, STYLE=BOLD, COLOR=RGB(0 32 120), $
TYPE = TABHEADING, LINE=4, SIZE=3, $
TYPE = TABHEADING, LINE=5, SIZE=9, STYLE=BOLD, $
TYPE = TABHEADING, LINE=6, SIZE=8, STYLE=BOLD, $
TYPE = TABHEADING, LINE=7, SIZE=8, STYLE=BOLD, $
TYPE = TABHEADING, LINE=8, SIZE=3, $
TYPE = REPORT, COLUMN=AGREEMENT_TYPE, WRAP=2.0, JUSTIFY=CENTER, $
TYPE = ACROSSVALUE, ACROSS=PRODUCT_CATEGORY,STYLE=BOLD,JUSTIFY=CENTER, BACKCOLOR=RGB(228 225 232), $
TYPE = ACROSSVALUE, ACROSS=PRODUCT_NAME, JUSTIFY=CENTER, BACKCOLOR=RGB(218 225 232), $
TYPE = TITLE, JUSTIFY=CENTER, BACKCOLOR=RGB(188 225 232),$
TYPE = GRANDTOTAL, BACKCOLOR=RGB(220 220 220), SIZE=8, STYLE=BOLD, $
TYPE = SUBTOTAL, SIZE=8, STYLE=BOLD, BACKCOLOR=RGB(235 235 235), $
-*TYPE = REPORT, ACROSS=PRODUCT_CATEGORY, BORDER=LIGHT, $ -------------------------------
-*TYPE = REPORT, COLUMN=PRODUCT_CODE_SORT, BORDER=LIGHT, $ -----------------------------------------------
TYPE = TABFOOTING, SIZE=8, JUSTIFY=LEFT, $
TYPE = DATA,COLUMN=P1, STYLE=BOLD, $
ENDSTYLE
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Hi Francis, My reply last night didn't show up here so I am doing it again. Your code worked here but there are some big Differences between the CAR database and our Sql output. We are sorting our output across the top row in a particular way that is from the relational table and Not letting WF do the sorting automatically. Thirdly, we pushed the row-total Down by one row so that may or may not have contributed a vertical border that is not highlighted by the html code. We had issues with the SORT ACROSS so that's why we used a table to achieve that sort 'sequence' in the way we had it in the report. Wasn't sure what you meant by 'reproducible code'. Can you tell me what you mean? It looks like it is showing up here in the post. Wasn't sure what you meant by > button either. Can you elaborate? Thank you.
Adrian, reproducible code is sample code that I can copy from the post and paste into a fex and run on my server. It usually uses one of the IBI-supplied test files, like CAR or GGSALES.
When posting code it's a good idea to indicate it's code. This is done by first clicking on the </> button, which is in the toolbar of the post window. This adds
[code]
[/code]
tags in the post between which you paste your code. This is done to prevent the forum from turning html code into the real thing. In your posted code for example, there's a "Big Grin" in the REVENUE line of code, something got translated to "Big Grin".
Meanwhile, despite what you're doing in SQL, your last TABLE file has some BY and ACROSS statements, which means WebFOCUS is doing the sorting.
As long as my sample code has the same number of fields and BY and ACROSS statements, with all of the style commands, I should be able to create code that mimics yours, using CAR, GGSALES, or any other IBI-supplied file commonly created during a WebFOCUS installation.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Wasn't sure what you meant by 'reproducible code'. Can you tell me what you mean? It looks like it is showing up here in the post.
Reproducible code is something anybody could just copy, paste and run in their own environments (i.e. Developer Studio) and see for themselves the issue that you describe. The code you posted however only runs in your environment because it is dependent on database tables that nobody else has.
To help us help you, we expect you to tailor a working example with IBI-provided files such as CAR or GGSALES which are available in most default installations, simulating the field values that are causing you trouble (use DEFINE/COMPUTE if needed). That way we can put our effort to try and find a solution or workaround, instead of devoting energy at trying to make up some code just to replicate the problem that only you understand in detail
Hi Francis and njsden, We are not using the natural sequence of the data and that is the crux of it I think.
The natural sequence of our product categories are (1) Carriers (2) Drivers (3) Vehicles in its natural sequence.
But our users want to see the products listed in the sequence (1) Drivers (2) Vehicles (3) Carriers.
And then, within the Product Categories there are Product Names, and again there is a natural sequence but they want to see the Product Names in a sequence that they prefer e.g AAA, ACA, ABA.
That is why we created some tables that have this unnatural sequence to use in the report.
The example that Francis has given us has a natural sequence of the data but we are creating our own unnatural sequence of data.
Even if I do give you the reproducible code, the data in CAR or GGSALES would be of no use, I think since they are in a natural sort sequence and our data is not in a natural sequence (my sequence described above).
Thus, can I make a copy of the CAR data and change the sequence around for the SEATS (from displaying sequence 2,4,5 to 4,5,2) and WHEELBASE (displaying sequence from 85.0, 88.6, 92.5 to 88.6, 92.5, 85.0) and use our code to show what I mean?
I hope I have explained my situation well enough. I hope I don't need to paste our code here since I think it is already there.
The issue is our users want to see the data in their own preferered sequence so we tried to provide that.
BTW the big grin in the code is actually a colon followed by uppercase D to give us a floating dollar sign in Revenue.
You may be creating your own unnatural sequence of data via the SQL statement, but the BY and ACROSS statements in the subsequent TABLE FILE SQLOUT request (SQLOUT being a WebFOCUS HOLD file) are the ones used to produce the report, they may or may not adhere to the unnatural sequence. BY and ACROSS order the report rows and columns.
Perhaps the error occurs because of &IS_SUBTOTAL.
Could you explain further - does the last vertical border not appear on every row, or only on one row?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Hi Francis, The last vertical border does not appear only on the row where the Product Category (Drivers, etc) is i.e first column heading.
But we have another report that is called from the html depending on whether a box is checked or not and this report has two additional columns in it and in this report the first TWO rows do not have the last vertical line at the end. The first two rows ar basically the Product category and Product name headings.
I will paste the report's code here to let you see it. Thanks.
-SET &VERSION_NUMBER = 'v1';
-*
-* results in a variable named &SERVER_NAME = DEV, TEST, PRDC, or PROD
-MRNOEDIT -INCLUDE SERVERID
-*
-SET &ECHO=ALL;
-*
SET HOLDLIST = PRINTONLY
SET PRINTPLUS = ON
SET CENT-ZERO = ON
SET SHOWBLANKS= ON
SET ASNAMES = ON
SET NODATA = '0'
-SET &IS_SUBTOTAL = 'Y';
-SET &RPT_APP_ID = 'HNOH';
-SET &RPT_NAME = 'ARIS - Volume and Revenue Auto Insurance Industry Hit No-Hit Report ';
-SET &RUN_DATE = &DATEMtrDYY;
-SET &RUN_DATE = TRUNCATE(&RUN_DATE);
-SET &RUN_TIME = EDIT(HHMMSS('A8'),'99$:99$:99');
-SET &REP_NAME = &RPT_NAME | ' ' | &VERSION_NUMBER | &SERVER_NAME_SHORT;
-SET &APP_NAME = 'Authorized Requester Information Services';
-DEFAULT &ADATE1 = '';
-DEFAULT &ADATE2 = '';
-DEFAULT &DT_FILTER1 = '';
-DEFAULT &DT_FILTER2 = '';
-DEFAULT &ADATE1 = '20140201';
-DEFAULT &ADATE2 = '20140228';
-*-DEFAULT &DT_FILTER1 = '20131220';
-*-DEFAULT &DT_FILTER2 = '20141231';
-SET &DT_FILTER1 = &ADATE1;
-SET &DT_FILTER2 = &ADATE2;
-DEFAULT &OUTPUT = 'HTML'; -* HTML EXL2K
-SET &DT_FILTER1 = EDIT(&ADATE1,'9999$$$$')|'-'|EDIT(&ADATE1,'$$$$99$$')|'-'|EDIT(&ADATE1,'$$$$$$99');
-SET &DT_FILTER2 = EDIT(&ADATE2,'9999$$$$')|'-'|EDIT(&ADATE2,'$$$$99$$')|'-'|EDIT(&ADATE2,'$$$$$$99');
-SET &RPT_FOOT =
- IF (&OUTPUT EQ 'HTML')
- THEN 'Report ID: &RPT_APP_ID.EVAL &VERSION_NUMBER.EVAL&SERVER_NAME_SHORT.EVAL User ID: &MTO_USER.EVAL Date: &RUN_DATE.EVAL Time: &RUN_TIME.EVAL'
- ELSE IF (&OUTPUT EQ 'EXL2K')
- THEN 'Report ID: &RPT_APP_ID.EVAL &VERSION_NUMBER.EVAL&SERVER_NAME_SHORT.EVAL User ID: &MTO_USER.EVAL Date: &RUN_DATE.EVAL Time: &RUN_TIME.EVAL'
- ELSE IF (&OUTPUT EQ 'PDF')
- THEN ' <1> Report ID: &RPT_APP_ID.EVAL &VERSION_NUMBER.EVAL&SERVER_NAME_SHORT.EVAL <23> User ID: &MTO_USER.EVAL <55> Date: &RUN_DATE.EVAL <80> Time: &RUN_TIME.EVAL <100>Page: <-3<TABPAGENO of <-4<TABLASTPAGE'
- ELSE '';
-SET &HLINE = IF (&OUTPUT EQ 'HTML' OR 'PDF') THEN "" ELSE FOC_NONE;
-SET &HLINE2= IF (&OUTPUT EQ 'HTML') THEN "" ELSE FOC_NONE;
-*
-SET &LAYOUT_HEAD = IF (&OUTPUT EQ 'HTML' OR 'EXL2K') THEN 'ON TABLE SUBHEAD' ELSE 'HEADING';
-SET &LAYOUT_FOOT = IF (&OUTPUT EQ 'HTML' OR 'EXL2K') THEN 'ON TABLE SUBFOOT' ELSE 'FOOTING BOTTOM';
-SET &AGR_TYPE = 'Auto Ins Co - Direct';
-* 'Auto Ins Co - Sub-client' 'Auto Ins Co - Direct' 'Auto Ins Broker - Direct' 'Direct pre-paid' 'Government (EDT)'
-DEFAULT &MTOUSER = '';
-SET &MTOUSER = &MTO_USER;
-*
-*--------------------------------------------------------------------------------
-* ----- START OF SQL QUERY PREPARATION ---
-*--------------------------------------------------------------------------------
-*
-INCLUDE sqldw_aris.fex
-*
SQL
SELECT
AI.AGREEMENT_CODE,
AI.AGREEMENT_TYPE,
(CASE WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'INDIRECT' THEN 'Auto Insurance Reseller'
WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '34' THEN ' '
WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '35' THEN ' '
ELSE 'Other' END) AS ISSUBCLIENT,
AI.PRODUCT_CATEGORY,
NVL(PS.PRODUCT_CATEGORY_SORT,CASE WHEN AI.PRODUCT_CATEGORY ='DRIVER' THEN 1
WHEN AI.PRODUCT_CATEGORY ='VEHICLE' THEN 2
WHEN AI.PRODUCT_CATEGORY ='CARRIER' THEN 3
ELSE 4
END) AS PRODUCT_CATEGORY_SORT,
AI.PRODUCT_CODE || ' - ' ||AI.PRODUCT_NAME AS PRODUCT_NAME,
NVL(PS.PRODUCT_CODE_SORT,1000) AS PRODUCT_CODE_SORT,
AI.HIT_NOHIT,
SUM(AI.ORDER_QTY) AS VOLUME,
SUM(AI.UNIT_PRICE_AMT) AS REVENUE
FROM
ARIS_OWNER.AUTO_INS_VOL_REV AI LEFT OUTER JOIN
ARIS_OWNER.RPT_PRODUCT_SORT PS ON AI.PRODUCT_CATEGORY = PS.PRODUCT_CATEGORY AND
AI.PRODUCT_CODE = PS.PRODUCT_CODE
WHERE
NVL(AI.HIT_NOHIT,'NULL') <> 'NULL'
AND AI.TRANSACTION_DATE BETWEEN TO_DATE('&DT_FILTER1 00:00:00','YYYY-MM-DD HH24:MI:SS')
AND TO_DATE('&DT_FILTER2 23:59:59','YYYY-MM-DD HH24:MI:SS')
GROUP BY
AI.AGREEMENT_CODE,
AI.AGREEMENT_TYPE,
(CASE WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'INDIRECT' THEN 'Auto Insurance Reseller'
WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '34' THEN ' '
WHEN AI.AGREEMENT_RELATIONSHIP_TYPE = 'DIRECT' AND AI.AGREEMENT_CODE = '35' THEN ' '
ELSE 'Other' END),
AI.PRODUCT_CATEGORY,
NVL(PS.PRODUCT_CATEGORY_SORT,CASE WHEN AI.PRODUCT_CATEGORY ='DRIVER' THEN 1
WHEN AI.PRODUCT_CATEGORY ='VEHICLE' THEN 2
WHEN AI.PRODUCT_CATEGORY ='CARRIER' THEN 3
ELSE 4
END),
AI.PRODUCT_CODE || ' - ' ||AI.PRODUCT_NAME,
PS.PRODUCT_CODE_SORT,
AI.HIT_NOHIT;
TABLE ON TABLE HOLD AS SQLOUT
END
-*
-*
-IF (&LINES EQ 0) OR (&FOCERRNUM NE 0) GOTO NO_DATA;
-*
SQL
SELECT
(CASE WHEN NVL(C.PRODUCT_CATEGORY_CNT,1) = 1 THEN 'N'
WHEN C.PRODUCT_CATEGORY_CNT > 1 AND (DR_SUB = 0 AND VH_SUB = 0 AND CR_SUB = 0) THEN 'N'
ELSE 'Y'
END) AS ACCROSS_SUB_TOTAL
FROM
(SELECT
SUM (CASE WHEN B.PRODUCT_CATEGORY = 'DRIVER' AND B.PRODUCT_CNT >1 THEN 1
ELSE 0 END) AS DR_SUB,
SUM (CASE WHEN B.PRODUCT_CATEGORY = 'VEHICLE' AND B.PRODUCT_CNT >1 THEN 1
ELSE 0 END) AS VH_SUB,
SUM(CASE WHEN B.PRODUCT_CATEGORY = 'CARRIER' AND B.PRODUCT_CNT >1 THEN 1
ELSE 0 END) AS CR_SUB,
SUM(B.PRODUCT_CATEGORY_CNT) AS PRODUCT_CATEGORY_CNT
FROM
(SELECT
AI.PRODUCT_CATEGORY,
COUNT(DISTINCT AI.PRODUCT_CODE) AS PRODUCT_CNT,
1 AS PRODUCT_CATEGORY_CNT
FROM
ARIS_OWNER.AUTO_INS_VOL_REV AI
WHERE
NVL(AI.HIT_NOHIT,'NULL') <> 'NULL' AND
AI.TRANSACTION_DATE BETWEEN TO_DATE('&DT_FILTER1 00:00:00','YYYY-MM-DD HH24:MI:SS')
AND TO_DATE('&DT_FILTER2 23:59:59','YYYY-MM-DD HH24:MI:SS')
GROUP BY
AI.PRODUCT_CATEGORY) B ) C;
TABLE ON TABLE HOLD AS IS_SUBTOTAL
END
-RUN
-READ IS_SUBTOTAL &IS_SUBTOTAL.A1.
DEFINE FILE SQLOUT
BLA/A1=' ';
END
-*
TABLE FILE SQLOUT
SUM
VOLUME/D7 AS 'Volume'
REVENUE/D10.2:D AS 'Revenue'
BY HIGHEST ISSUBCLIENT AS ''
BY BLA AS '' NOPRINT
SUBTOTAL AS 'Sub-Total' MULTILINES
BY AGREEMENT_TYPE AS 'Agreement Type'
BY AGREEMENT_CODE NOPRINT
ACROSS LOWEST PRODUCT_CATEGORY_SORT NOPRINT
-IF &IS_SUBTOTAL EQ 'N' THEN GOTO NO_SUBTOTAL;
ACROSS PRODUCT_CATEGORY AS '' SUBTOTAL AS 'Sub-Total'
-GOTO ISSUBTOTAL
-NO_SUBTOTAL
ACROSS PRODUCT_CATEGORY AS ''
-ISSUBTOTAL
ACROSS LOWEST PRODUCT_CODE_SORT NOPRINT
ACROSS PRODUCT_NAME AS ''
ACROSS HIT_NOHIT AS ''
-*
-*
&LAYOUT_HEAD
"Management Information System"
&HLINE
"&RPT_NAME"
&HLINE
"From: &DT_FILTER1 To: &DT_FILTER2"
" "
&HLINE2
&LAYOUT_FOOT
&HLINE
"&RPT_FOOT.EVAL"
ON TABLE ROW-TOTAL AS 'Total'
ON TABLE COLUMN-TOTAL AS 'GRAND TOTAL'
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT '&OUTPUT'
ON TABLE SET HTMLCSS ON
ON TABLE SET CSSURL '/wf76/approot/mtomis/report.css'
ON TABLE SET EMPTYCELLS OFF
ON TABLE SET LINES 999999
ON TABLE SET STYLE *
-*
-*
-GOTO STY_&OUTPUT.EVAL1
-*
-*
-* **************************************
-* HTML Output Format Definition
-* **************************************
-STY_HTML1
-*
TYPE = REPORT, GRID=ON, SIZE=8, JUSTIFY=RIGHT, ORIENTATION='LANDSCAPE', BORDER=LIGHT, $
TYPE=FOOTING, GRID=OFF, SIZE=7, JUSTIFY=LEFT, $
TYPE = TABHEADING, SIZE=10, JUSTIFY=CENTER, COLOR=BLACK, $
TYPE = TABHEADING, LINE=1, SIZE=10, STYLE=BOLD, $
TYPE = TABHEADING, LINE=2, SIZE=3, $
TYPE = TABHEADING, LINE=3, SIZE=11, STYLE=BOLD, COLOR=RGB(0 32 120), $
TYPE = TABHEADING, LINE=4, SIZE=3, $
TYPE = TABHEADING, LINE=5, SIZE=9, STYLE=BOLD, $
TYPE = TABHEADING, LINE=6, SIZE=8, STYLE=BOLD, $
TYPE = TABHEADING, LINE=7, SIZE=8, STYLE=BOLD, $
TYPE = TABHEADING, LINE=8, SIZE=3, $
TYPE = SUBTOTAL, SIZE=8, STYLE=BOLD, BACKCOLOR=RGB(235 235 235), $
TYPE = REPORT, COLUMN=AGREEMENT_TYPE, WRAP=2.0, JUSTIFY=CENTER, $
TYPE = ACROSSVALUE, ACROSS=PRODUCT_CATEGORY,STYLE=BOLD,JUSTIFY=CENTER, BACKCOLOR=rgb(228 225 232), $
TYPE = ACROSSVALUE, ACROSS=PRODUCT_NAME, JUSTIFY=CENTER, BACKCOLOR=rgb(218 225 232), $
TYPE = ACROSSVALUE, ACROSS=HIT_NOHIT, JUSTIFY=CENTER, BACKCOLOR=rgb(208 225 232), $
TYPE = TITLE, JUSTIFY=CENTER, BACKCOLOR=rgb(188 225 232), $
TYPE = GRANDTOTAL, BACKCOLOR=RGB(220 220 220), SIZE=8, STYLE=BOLD, $
TYPE=TABFOOTING, SIZE=8, JUSTIFY=LEFT, $
TYPE = DATA,COLUMN=P1, STYLE=BOLD, $
TYPE = DATA,COLUMN=P2,TARGET='_blank', FOCEXEC=app/ar_ai_hnh_dd.fex(AGR_TYPE=AGREEMENT_TYPE AGR_CODE=AGREEMENT_CODE DT_FILTER1='&DT_FILTER1' DT_FILTER2='&DT_FILTER2' MTOUSER='&MTO_USER' OUTPUT='&OUTPUT' ), $
-*
-GOTO STY_END1
-*
-*
-* **************************************
-* Excel Output Format Definition
-* **************************************
-STY_EXL2K1
-*
UNITS=IN, GAPINTERNAL=ON, PAGESIZE='LETTER', ORIENTATION='LANDSCAPE', $
TYPE=REPORT, GRID=ON, SIZE=10, SQUEEZE=ON, JUSTIFY=RIGHT, titletext='&RPT_NAME', $
TYPE=TABHEADING, SIZE=10, JUSTIFY=CENTER, COLOR=BLACK, $
TYPE=TABHEADING, LINE=1, SIZE=10, STYLE=BOLD, $
TYPE=TABHEADING, LINE=2, SIZE=11, STYLE=BOLD, COLOR=RGB(0 32 120), $
TYPE=TABHEADING, LINE=3, SIZE=8, STYLE=BOLD, $
TYPE=TABHEADING, LINE=4, SIZE=8, STYLE=BOLD, $
TYPE=TABHEADING, LINE=5, SIZE=8, STYLE=BOLD, $
TYPE=SUBTOTAL, SIZE=9, $ -* WHEN AGREEMENT_CODE NE '35' $
TYPE=REPORT,COLUMN=P2,SQUEEZE=1.5, JUSTIFY=LEFT, $
TYPE=REPORT, COLUMN=AGREEMENT_TYPE, WRAP=2.0, JUSTIFY=LEFT, STYLE=BOLD, BORDER=0, $
TYPE=ACROSSVALUE, ACROSS=PRODUCT_CATEGORY, STYLE=BOLD, JUSTIFY=CENTER, BORDER=0, BACKCOLOR=rgb(228 225 232), $
-*TYPE=ACROSSVALUE, ACROSS=PRODUCT_NAME, STYLE=NORMAL, BORDER-LEFT=0.5,BORDER-TOP=0.5,$
TYPE=ACROSSVALUE, ACROSS=PRODUCT_NAME, STYLE=NORMAL, BORDER=0, BACKCOLOR=rgb(228 225 232), $
TYPE=ACROSSVALUE, ACROSS=HIT_NOHIT, JUSTIFY=CENTER, BACKCOLOR=rgb(208 225 232), $
TYPE=TITLE, JUSTIFY=CENTER, BACKCOLOR=rgb(228 225 232), $
TYPE=GRANDTOTAL, BACKCOLOR=RGB(235 235 235), $
TYPE=TABFOOTING, SIZE=8, JUSTIFY=LEFT, $
TYPE=DATA,COLUMN=P1, STYLE=BOLD, $
TYPE=DATA,COLUMN=P2,TARGET='_blank', FOCEXEC=app/ar_ai_hnh_dd.fex(AGR_TYPE=AGREEMENT_TYPE AGR_CODE=AGREEMENT_CODE DT_FILTER1='&DT_FILTER1' DT_FILTER2='&DT_FILTER2' MTOUSER='&MTO_USER' OUTPUT='&OUTPUT' ), $
-*
-*
-GOTO STY_END1
-*
-*
-STY_END1
ENDSTYLE
END
-*
-*
-IF (&LINES GT 0) AND (&FOCERRNUM EQ 0) THEN GOTO REPORT_END ELSE GOTO NO_DATA;
-*
-*
-**************************************************************************
-* if no records found or error happens, display message
-**************************************************************************
-NO_DATA
-*
-*
-MRNOEDIT -INCLUDE MISI2003.fex
-*
-*
-REPORT_END