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.
I have the following, which works perfectly when run with autoprompt. I can leave &SUPPLIER or &SALESREP blank and get appropriate results
-INCLUDE FILEDEFS
-SET &ECHO=ALL;
DEFINE FILE NEWORDER
-*FOBT/P10.2=FOB * PQTY / 1000;
FOBT/P10.2=FOB * PQTY;
KG/D7C = IF SOLDBY EQ 'LB' THEN PQTY / 2.204 ELSE PQTY;
PDESC = UPCASE(45, PDESC, PDESC);
DUMMY/A1='';
BEGDATE/YYMD=&BEGDATE;
ENDDATE/YYMD=&ENDDATE;
END
-SET &SUPPLIER2=IF &SUPPLIER EQ _FOC_NULL THEN 'All suppliers' ELSE 'Supplier(s) ' | &SUPPLIER;
-SET &SALESREP2=IF &SALESREP EQ _FOC_NULL THEN 'All sales reps' ELSE 'Sales rep(s) ' | &SALESREP;
-SET &SORTSTRING=IF &SORTING EQ 1 THEN 'BY NEWORDER.ROOT_SEG.CCODE AS ''Cust'' BY NEWORDER.PRODUCTS.PDESC AS ''Product'''
- ELSE 'BY NEWORDER.PRODUCTS.PDESC AS ''Product'' BY NEWORDER.ROOT_SEG.CCODE AS ''Cust''';
-SET &SKIPIT=IF &SORTING EQ 1 THEN 'ON NEWORDER.ROOT_SEG.CCODE SKIP-LINE' ELSE 'ON NEWORDER.PRODUCTS.PDESC SKIP-LINE';
-SET &PRICESTRING=IF &SHOWPRICE EQ 1 THEN 'NEWORDER.PRODUCTS.KG AS ''KG'' NEWORDER.PRODUCTS.FOBT AS ''FOB'''
- ELSE 'NEWORDER.PRODUCTS.KG/D7C';
-SET &DEPTSTRING=IF &SHOWDEPT EQ 1 THEN 'BY NEWORDER.ROOT_SEG.DEPT AS ''Dept''' ELSE '';
-SET &SUBTOTALS=IF &SORTING EQ 1 THEN 'ON NEWORDER.ROOT_SEG.CCODE SUBTOTAL KG AS ''*TOTAL '''
- ELSE 'ON NEWORDER.PRODUCTS.PDESC SUBTOTAL KG AS ''*TOTAL ''';
-IF &WFFMT EQ 'EXL07' GOTO SPREADSHEET;
-*GOTO DONE
SET BYDISPLAY=OFF
TABLE FILE NEWORDER
SUM
&PRICESTRING
&SORTSTRING
&DEPTSTRING
ACROSS NEWORDER.ROOT_SEG.BL_YEAR AS ''
&SUBTOTALS
ON TABLE SUBHEAD
"Who Buys What from <BEGDATE to <ENDDATE"
"&SUPPLIER2 &SALESREP2"
"Report printed on <+0>&DATEtrMDYY <+0> "
" "
&SKIPIT
ON TABLE SUBFOOT
"This report runs from the file &FOCFEXNAME"
WHERE ( NEWORDER.PRODUCTS.PSCODE EQ &SUPPLIER.(OR(FIND PSCODE IN NEWORDER)).PSCODE. );
WHERE ( NEWORDER.ROOT_SEG.CCODE EQ &CCODE.(OR(FIND CCODE IN NEWORDER)).CCODE. );
WHERE NEWORDER.ROOT_SEG.BLDATE GE &BEGDATE AND NEWORDER.ROOT_SEG.BLDATE LE &ENDDATE;
WHERE NEWORDER.PRODUCTS.PSCODE NE '.';
WHERE ( NEWORDER.ROOT_SEG.SALESREP EQ &SALESREP.(OR(FIND SALESREP IN NEWORDER)).SALESREP. );
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PRINT ONLINE
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
INCLUDE = problue,
$
ENDSTYLE
END
[/code
However, when I run it from an html page I get this - with &ECHO=ALL
In this case I've set &SUPPLIER='PATCHM' and left the &SALESREP and &CCODE fields at 'ALL'
[code]
DEFINE FILE NEWORDER
-*FOBT/P10.2=FOB * PQTY / 1000;
FOBT/P10.2=FOB * PQTY;
KG/D7C = IF SOLDBY EQ 'LB' THEN PQTY / 2.204 ELSE PQTY;
PDESC = UPCASE(45, PDESC, PDESC);
DUMMY/A1='';
BEGDATE/YYMD=13/03/01;
ENDDATE/YYMD=14/03/01;
END
-SET &SUPPLIER2=IF 'PATCHM' EQ _FOC_NULL THEN 'All suppliers' ELSE 'Supplier(s) ' | 'PATCHM';
-SET &SALESREP2=IF _FOC_NULL EQ _FOC_NULL THEN 'All sales reps' ELSE 'Sales rep(s) ' | _FOC_NULL;
-SET &SORTSTRING=IF 1 EQ 1 THEN 'BY CCODE AS ''Cust'' BY PDESC AS ''Product'''
- ELSE 'BY PDESC AS ''Product'' CCODE AS ''Cust''';
-SET &SKIPIT=IF 1 EQ 1 THEN 'ON CCODE SKIP-LINE' ELSE 'ON PDESC SKIP-LINE';
-SET &PRICESTRING=IF 2 EQ 1 THEN KG AS ''KG'' FOBT AS ''FOB'''
- ELSE KG';
-SET &DEPTSTRING=IF 1 EQ 1 THEN 'BY DEPT AS ''Dept''' ELSE '';
-SET &SUBTOTALS=IF 1 EQ 1 THEN 'ON CCODE SUBTOTAL KG AS ''*TOTAL '''
- ELSE 'ON PDESC SUBTOTAL KG AS ''*TOTAL ''';
-IF PDF EQ 'EXL07' GOTO SPREADSHEET;
-*GOTO DONE
SET BYDISPLAY=OFF
TABLE FILE NEWORDER
SUM
NEWORDER.PRODUCTS.KG/D7C
BY NEWORDER.ROOT_SEG.CCODE AS 'Cust' BY NEWORDER.PRODUCTS.PDESC AS 'Product'
BY NEWORDER.ROOT_SEG.DEPT AS 'Dept'
ACROSS NEWORDER.ROOT_SEG.BL_YEAR AS ''
ON NEWORDER.ROOT_SEG.CCODE SUBTOTAL KG AS '*TOTAL '
ON TABLE SUBHEAD
"Who Buys What from <BEGDATE to <ENDDATE"
"Supplier(s) 'PATCHM' All sales reps"
"Report printed on <+0>March 7, 2014 <+0> "
" "
ON NEWORDER.ROOT_SEG.CCODE SKIP-LINE
ON TABLE SUBFOOT
"This report runs from the file sales_whobuyswhat_monthly"
WHERE ( NEWORDER.PRODUCTS.PSCODE EQ 'PATCHM' );
WHERE ( NEWORDER.ROOT_SEG.CCODE EQ _FOC_NULL );
WHERE NEWORDER.ROOT_SEG.BLDATE GE 13/03/01 AND NEWORDER.ROOT_SEG.BLDATE LE 14/03/01;
WHERE NEWORDER.PRODUCTS.PSCODE NE '.';
WHERE ( NEWORDER.ROOT_SEG.SALESREP EQ _FOC_NULL );
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PRINT ONLINE
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
INCLUDE = problue,
ENDSTYLE
END
-DONE
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
This message has been edited. Last edited by: George Patton,