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.
We have a HTML page that shows multiple reports and graphs for a policy or account using parameters. A hyperlink on the page allows a user to create a PDF composite report of the information on the HTML page. Underwriters currently display this PDF for every policy that renews and prints the report into our imaging software manually. I'm trying to automate this process by reading a SQL file of policy numbers that renew and creating the PDF for every number in the file. I get the PDF generated for the first policy, but not for any subsequent values. I've even tried putting the execution in one fex three times with different parameters, but still only get one report.
I've searched this forum and tried some of the ideas presented with no luck. I've considered the duplicate label problem, but I'm not getting an error message, just a single PDF report. I've never done anything this complex in WEBFOS before so any pointers/suggestions would be appreciated. Here's the code:
Main Report:
-* File account_review_recurring.fex
SET ALL=ON, NODATA=' '
-DEFAULT &Criteria_Type = 'Policy';
-*-DEFAULT &Criteria_Value = '162085';
ENGINE SQLMSS SET DEFAULT_CONNECTION SQL_Reporting
SQL SQLMSS PREPARE SQLOUT FOR
select Policy_No as Criteria_Value
FROM [wrkphil].[dbo].[RPT_POLICIES_TO_RENEW]
;
END
TABLE FILE SQLOUT
PRINT Criteria_Value
ON TABLE SAVE AS MYOUT FORMAT ALPHA
END
-IF &LINES EQ 0 GOTO NORPT;
-RUN
-SET &RECS = &LINES;
-SET &CNT = 1;
SET COMPOUND = OPEN NOBREAK
-START
-READ MYOUT &Criteria_Value.A6
SET COMPOUND = NOBREAK
-IF &CNT NE &RECS THEN GOTO SKIPCLOSE;
SET COMPOUND = CLOSE NOBREAK
-SKIPCLOSE
EX underwriting/account_review_composite CRITERIA_TYPE=&Criteria_Type, CRITERIA_VALUE=&Criteria_Value
-IF &CNT EQ &RECS GOTO FINISH;
-SET &CNT = &CNT + 1;
-IF &CNT LE &RECS GOTO START;
-FINISH
SET COMPOUND = CLOSE
-NORPT
END
Composite Report FWX:
-* File account_review_composite
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.25^0.25^0.25^0.25^.5', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, $
PAGELAYOUT=ALL, NAME='Page Master', $
OBJECT=STRING, NAME='text2', TEXT='<font face="ARIAL" size=8>Page <ibi-page-number/> of <ibi-total-pages/></font>', POSITION=(0.500 10.313), MARKUP=ON, WRAP=ON, DIMENSION=(2.813 0.167), METADATA='', $
COMPONENT='DfltCmpt1', POSITION=(0 0), DIMENSION=(0 0), $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.0, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.0,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='account_header', TEXT='header', TOC-LEVEL=2, POSITION=(0.521 0.521), DIMENSION=(* *), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.5in; HEIGHT: 2.396in; OVERFLOW: auto; TOP: 0.521in; LEFT: 0.521in', $
COMPONENT='reinsurance', TEXT='reinsurance', TOC-LEVEL=2, POSITION=(+0.000 +0.000), DIMENSION=(* *), RELATIVE-TO='account_header', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT, METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.479in; HEIGHT: 3.125in; OVERFLOW: auto; TOP: 2.917in; LEFT: 0.521in', $
COMPONENT='manuscript', TEXT='manuscript', TOC-LEVEL=2, POSITION=(-0.042 -3.563), DIMENSION=(* *), RELATIVE-TO='reinsurance', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT, METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.479in; HEIGHT: 1.414in; OVERFLOW: auto; TOP: 2.479in; LEFT: 0.479in', $
COMPONENT='related_ministry', TEXT='related_ministry', TOC-LEVEL=2, POSITION=(+0.040 +1.882), DIMENSION=(* *), RELATIVE-TO='manuscript', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT, METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.458in; HEIGHT: 2.808in; OVERFLOW: auto; TOP: 5.775in; LEFT: 0.519in', $
PAGELAYOUT=2, NAME='Page layout 2', text='Page layout 2', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='lossratioreport', TEXT='loss_ratio_report', TOC-LEVEL=2, POSITION=(0.500 0.500), DIMENSION=(* *), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.5in; HEIGHT: 1.942in; OVERFLOW: auto; TOP: 0.5in; LEFT: 0.5in', $
COMPONENT='lossratiograph', TEXT='loss_ratio_graph', TOC-LEVEL=2, POSITION=(-0.001 -1.944), DIMENSION=(* *), RELATIVE-TO='lossratioreport', RELATIVE-POINT=BOTTOM-LEFT, POSITION-POINT=TOP-LEFT, METADATA='Z-INDEX: 101; POSITION: absolute; WIDTH: 7.5in; HEIGHT: 3.789in; OVERFLOW: auto; TOP: 0.498in; LEFT: 0.499in', $
PAGELAYOUT=3, NAME='Page layout 3', text='Page layout 3', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='loss_history', TEXT='loss_history', TOC-LEVEL=2, POSITION=(0.521 0.521), DIMENSION=(* *), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.5in; HEIGHT: 2.396in; OVERFLOW: auto; TOP: 0.521in; LEFT: 0.521in', $
END
SET COMPONENT='DfltCmpt1'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
END
SET COMPONENT='account_header'
-*component_type report
-INCLUDE account_review_header_composite.fex
SET COMPONENT='reinsurance'
-*component_type report
-INCLUDE reinsurance_sidebar_composite.fex
SET COMPONENT='manuscript'
-*component_type report
-INCLUDE manuscript_forms_report_composite.fex
SET COMPONENT='related_ministry'
-*component_type report
-INCLUDE related_ministries_report_composite.fex
SET COMPONENT='lossratioreport'
-*component_type report
-INCLUDE loss_ratio_report_composite.fex
SET COMPONENT='lossratiograph'
-*component_type report
-INCLUDE loss_ratio_graph_composite.fex
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
ON TABLE SET PAGE-NUM NOLEAD
IF READLIMIT EQ 1
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
type=HEADING, IMAGE=HOLD.svg, position=(0 0), $
TYPE=REPORT,PAGE-LOCATION=OFF,$
END
SET COMPONENT='loss_history'
-*component_type report
-INCLUDE loss_history_report_composite.fex
COMPOUND END
Called FEX Samples:
-* File reinsurance_property.fex
-SET PAGE=NOPAGE;
-DEFAULT &CRITERIA_TYPE = 'Policy';
-DEFAULT &CRITERIA_VALUE = '348899';
-SET &CRITERIA_FIELD = '&CRITERIA_TYPE.EVAL' || '_Number';
ENGINE SQLMSS SET DEFAULT_CONNECTION SQL_Reporting
SQL SQLMSS PREPARE SQLOUT FO
select c.Coverage_Type, r.Policy_Number, left(c.Carrier_Name, 15) as Carrier_Name,
'$' + CONVERT(VARCHAR(18), CAST(c.Risk_Amount AS MONEY), 1) as Risk_Amount,
'$' + CONVERT(VARCHAR(18), CAST(c.Premium_Total AS MONEY), 1) as Premium_Total,
'$' + CONVERT(VARCHAR(18), CAST(c.Price_Per_Million AS MONEY), 1) as Price_Per_Million,
'PML' as Col1_Text, '$' + CONVERT(VARCHAR(18), CAST(Probable_Maximum_Loss AS MONEY), 1) as Col1_Val,
'Avg. Rate' as Col2_Text, '$' + CONVERT(VARCHAR(18), CAST(Property_Average_Rate AS MONEY), 1) as Col2_Val,
'Deductible' as Col3_Text, Property_Deductible as Col3_Val
from biprod.dbo.RPT_REINSURANCE_SUMMARY r
left outer join biprod.dbo.RPT_REINSURANCE_CARRIER_SUMMARY c
on r.Policy_Number = c.Policy_Number
where r.&CRITERIA_FIELD = &CRITERIA_VALUE and c.Coverage_Type = 'Property'
union all
select c.Coverage_Type, r.Policy_Number, left(c.Carrier_Name, 15) as Carrier_Name,
'$' + CONVERT(VARCHAR(18), CAST(c.Risk_Amount AS MONEY), 1) as Risk_Amount,
'$' + CONVERT(VARCHAR(18), CAST(c.Premium_Total AS MONEY), 1) as Premium_Total,
'$' + CONVERT(VARCHAR(18), CAST(c.Price_Per_Million AS MONEY), 1) as Price_Per_Million,
'D & O Sublimit' as Col1_Text, Directors_And_Officers_Sublimit as Col1_Val,
'EPL Sublimit' as Col2_Text, Employee_Practices_Liability_Sublimit as Col2_Val,
'SAC Sublimit' as Col3_Text, Sexual_Acts_Sublimit as Col3_Val
from biprod.dbo.RPT_REINSURANCE_SUMMARY r
left outer join biprod.dbo.RPT_REINSURANCE_CARRIER_SUMMARY c
on r.Policy_Number = c.Policy_Number
where r.&CRITERIA_FIELD = &CRITERIA_VALUE and c.Coverage_Type = 'Liability'
;
END
TABLE FILE SQLOUT
BY Policy_Number NOPRINT AS 'Policy #'
BY HIGHEST Coverage_Type NOPRINT
BY Carrier_Name AS ''
BY Risk_Amount AS ''
BY Premium_Total AS ''
BY Price_Per_Million AS ''
ON Policy_Number SUBHEAD
" Policy#: <Policy_Number"
ON Coverage_Type SUBHEAD
" "
"<Coverage_Type"
"<Col1_Text<Col2_Text<Col3_Text"
"<Col1_Val<Col2_Val<Col3_Val"
"Carrier<+0>Risk<+0>Prem<+0>$/Mil"
ON TABLE SUBHEAD
"Reinsurance Information"
ON TABLE SET PAGE NOLEAD
ON TABLE SET EMPTYREPORT ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=9,
TOPGAP=0.000000,
BOTTOMGAP=0.055556,
$
TYPE=DATA,
COLUMN=N3,
FONT='ARIAL',
SIZE=8,
$
TYPE=DATA,
COLUMN=N4,
FONT='ARIAL',
SIZE=8,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=N5,
FONT='ARIAL',
SIZE=8,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=N6,
FONT='ARIAL',
SIZE=8,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=N1,
FONT='ARIAL',
SIZE=8,
STYLE=BOLD,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N1,
STYLE=BOLD,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=10,
STYLE=BOLD,
$
TYPE=TABFOOTING,
STYLE=BOLD,
$
TYPE=HEADING,
STYLE=BOLD,
$
TYPE=FOOTING,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBHEAD,
BY=1,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
BORDER-TOP-COLOR=RGB(153 153 153),
BORDER-BOTTOM-COLOR=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DERLINE,
JUSTIFY=RIGHT,
WIDTH=1.139,
$
TYPE=SUBHEAD,
BY=2,
LINE=5,
OBJECT=TEXT,
ITEM=4,
SIZE=8,
STYLE=BOLD+UNDERLINE,
JUSTIFY=RIGHT,
WIDTH=1.181,
$
TYPE=SUBFOOT,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N3,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N4,
SQUEEZE=0.750000,
$
TYPE=REPORT,
COLUMN=N5,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N6,
SQUEEZE=1.000000,
$
TYPE=REPORT,
COLUMN=N1,
SQUEEZE=2.000000,
$
TYPE=REPORT,
COLUMN=N2,
SQUEEZE=0.750000,
$
ENDSTYLE
END
This message has been edited. Last edited by: Kerry,
When debugging problems always go back to the CAR file to see if you can reproduce the issue. From what I can tell the issue is not with the EX. Looks like the problem is that you can not combine old and new ways of doing compound reports. If you remove the comments on the "Regular Report" and comment out the "Coordinated Report" you get a report for every country. If you run the code as is you just get a report for ENGLAND. Same thing you are getting. Open a case with IBI and see what they say. Also, someone with more insight might have a workaround.
-* File car_compound.fex
SET MESSAGE = OFF
-SET &ECHO = 'OFF';
-SET &COUNTRY = 'ENGLAND';
-SET &COUNTRY = 'FOC_NONE';
TABLE FILE CAR
SUM
COMPUTE COUNTRY_ID/I8 = COUNTRY_ID + 1;
COUNTRY
BY COUNTRY NOPRINT
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HCNTRYS
END
-RUN
-SET &CNTRY_CNT = &LINES;
-IF (&CNTRY_CNT EQ 0) GOTO NORPT;
-REPEAT LOOP_RPT FOR &N FROM 1 TO &CNTRY_CNT STEP 1
-* Get the country
TABLE FILE HCNTRYS
PRINT
COUNTRY
WHERE COUNTRY_ID EQ &N;
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
-READ SAVE &COUNTRY.A10.
-RUN
-TYPE Processing ==== &COUNTRY
-SET &CMPD_VALUE = IF (&N NE 1) AND (&CNTRY_CNT NE &N) THEN 'OPEN' ELSE
- IF (&N EQ 1) AND (&CNTRY_CNT NE &N) THEN 'OPEN' ELSE 'CLOSE';
-* Set Compound Value
SET COMPOUND = &CMPD_VALUE
-RUN
-* Regular Report
-*TABLE FILE CAR
-*PRINT
-*LENGTH
-*WIDTH
-*BY COUNTRY
-*BY BODYTYPE
-*BY MODEL
-*WHERE COUNTRY EQ '&COUNTRY';
-*HEADING
-*"CAR SPECS"
-*ON TABLE SET PAGE-NUM OFF
-*ON TABLE PCHOLD FORMAT PDF
-*END
-*-RUN
-* Coordinated Report
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^1', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, $
PAGELAYOUT=1, NAME='Layout page 1', text='Layout page 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='report2', TEXT='report2', TOC-LEVEL=1, POSITION=(0.501 0.501), DIMENSION=(7.501 3.973), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.501in; HEIGHT: 3.973in; TOP: 0.501in; LEFT: 0.501in', $
PAGELAYOUT=2, NAME='Layout page 2', text='Layout page 2', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='report3', TEXT='report3', TOC-LEVEL=1, POSITION=(0.499 0.496), DIMENSION=(7.496 4.641), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.496in; HEIGHT: 4.641in; TOP: 0.496in; LEFT: 0.499in', $
PAGELAYOUT=3, NAME='Layout page 3', text='Layout page 3', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=1, POSITION=(0.499 0.810), DIMENSION=(7.500 5.516), METADATA='Z-INDEX: 100; POSITION: absolute; WIDTH: 7.5in; HEIGHT: 5.516in; TOP: 0.81in; LEFT: 0.499in', $
END
SET COMPONENT='report2'
-*component_type report
TABLE FILE CAR
PRINT
LENGTH
WIDTH
BY COUNTRY
BY BODYTYPE
BY MODEL
WHERE COUNTRY EQ '&COUNTRY';
HEADING
"CAR SPECS"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END
SET COMPONENT='report3'
-*component_type report
TABLE FILE CAR
PRINT
COMPUTE MODEL2/A15 = EDIT(MODEL, '999999999999999');
DEALER_COST AS DCOST
RETAIL_COST AS RCOST
BY COUNTRY
BY BODYTYPE
WHERE COUNTRY EQ '&COUNTRY';
HEADING
"COST DIFFERENCES"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END
SET COMPONENT='report1'
-*component_type report
TABLE FILE CAR
SUM
AVE.DEALER_COST
AVE.RETAIL_COST
BY COUNTRY
BY BODYTYPE
WHERE COUNTRY EQ '&COUNTRY';
HEADING
"AVERAGE COST"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END
COMPOUND END
-TYPE Finished ===== &COUNTRY
-LOOP_RPT
-NORPT