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'm trying to send more than one report into a PDF or Excel file by coding:
ON TABLE PCHOLD FORMAT '&WFFMT' OPEN (for the 1st)
...
ON TABLE PCHOLD FORMAT '&WFFMT' CLOSE (for the last)
and I get an error:
0 ERROR AT OR NEAR LINE 107 IN PROCEDURE BA_LisenFOCEXEC * (FOC002) A WORD IS NOT RECOGNIZED: OPEN (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND 0 NUMBER OF RECORDS IN TABLE= 9 LINES= 9 (FOC1394) CONNECT FAILURE (FOC1400) SQLCODE IS -1032 (HEX: FFFFFBF8) : [S1000] [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine : cannot open the file '(unknown)'. It is already opened exclusively by : another user, or you need permission to view its data. [IM006] [Microsof : t][ODBC Driver Manager] Driver's SQLSetConnectAttr failed L (FOC1406) SQL OPEN CURSOR ERROR.
HTML show all reports one after the other without the OPEN and CLOSE commands but Excel 2K and PDF only show the first one.
I'm not sure why you want the file name, parms for the pdf are not liking, however here is a code sample to create a PDF compound repor, sorry didn't clean up my commented out code. It creates two reports in one pdf file. The file can be saved from ADOBE
JOIN CLEAR * JOIN TERM_CYT AND STU_ID IN RTRTTBL_UNO_PROD TO ALL TERM_CYT AND STU_ID IN RTPGTBL_UNO_PROD AS AJPG END TABLE FILE RTRTTBL_UNO_PROD SUM STU_ID AS STU_ID CAREER_LEVEL AS CAREER RT020/D12.2 AS CREDIT_HOURS RT015/D12.2 AS FAM_HOURS RT090 AS RT090 BY TERM_CYT AS TERM_CYT BY STU_ID IF ACAD_PGM_SEQ EQ 1 IF TERM_CYT EQ '20033' OR '20023' -*IF RT090 NE 'N' IF DEGREE EQ 'BGS' ON TABLE HOLD AS HOLD1 ON TABLE SET ASNAMES ON END DEFINE FILE HOLD1 FULLPART/A5 = IF RT090 EQ 'F' OR 'S' THEN 'FULL' ELSE IF RT090 EQ 'N' THEN 'NOT' ELSE 'PART'; END TABLE FILE HOLD1 ON TABLE SET COMPOUND OPEN ON TABLE PCHOLD FORMAT PDF -*ON TABLE SET ONLINE-FMT PDF ON TABLE COLUMN-TOTAL ROW-TOTAL ON TABLE SET STYLE * TYPE=REPORT,FONT = COURIER, SIZE = 10 , $ ENDSTYLE HEADING CENTER "UNVERSITY OF NEBRASKA AT OMAHA" "ENROLLMENT FIGURES FOR FALL 2003/FALL 2002" "GENERATED ON &DATE AT &TOD" " " COUNT STU_ID AS '' -*BY CAREER BY TERM_CYT AS 'TERM' ACROSS FULLPART AS '' END TABLE FILE HOLD1 ON TABLE SET COMPOUND CLOSE -*ON TABLE SET ONLINE-FMT PDF ON TABLE PCHOLD FORMAT PDF ON TABLE COLUMN-TOTAL ROW-TOTAL ON TABLE SET STYLE * TYPE=REPORT,FONT = COURIER, SIZE = 10 , $ ENDSTYLE HEADING CENTER "UNVERSITY OF NEBRASKA AT OMAHA" "ENROLLMENT HOURS FOR FALL 2003/FALL 2002" "GENERATED ON &DATE AT &TOD" " " SUM CREDIT_HOURS -*FAM_HOURS -*BY CAREER BY TERM_CYT AS 'TERM' ACROSS FULLPART AS '' END
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
TABLE FILE CAR SUM SALES BY CAR ACROSS COUNTRY HEADING "Sales Report" " " ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=HEADING, SIZE=13, $ TYPE=REPORT, FONT='Arial', SIZE=11, COLOR=RED, $ ENDSTYLE END -RUN
SET COMPOUND = NOBREAK -RUN
TABLE FILE CAR SUM DEALER_COST BY MODEL ACROSS COUNTRY HEADING "Inventory Report" " " ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=HEADING, SIZE=13, $ TYPE=REPORT, FONT='Arial', SIZE=11, COLOR=GREEN, $ ENDSTYLE END -RUN
TABLE FILE CAR PRINT CAR HEADING "Car List" " " ON TABLE PCHOLD FORMAT PDF ON TABLE SET PAGE OFF ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=HEADING, SIZE=13, $ TYPE=REPORT, FONT='Arial', SIZE=11, COLOR=BLUE, $ ENDSTYLE END -RUN
Thanks for your Help Pietro, I had it work following your code.
FYI, to create more than one report in Excel, here's the code:
Example 1 -TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX -TYPE WEBFOCUS CGIVAR IBIWF_mprefix=PDFA Report TABLE FILE CAR PRINT CAR ON TABLE PCHOLD FORMAT EXCEL END -RUN -TYPE WEBFOCUS CGIVAR IBIWF_mprefix=PDFB Report TABLE FILE CAR PRINT COUNTRY ON TABLE PCHOLD FORMAT EXCEL END
Example 2 -TYPE WEBFOCUS CGIVAR IBIWF_mreports=frame TABLE FILE CAR PRINT CAR MODEL SEATS BY COUNTRY ON TABLE PCHOLD FORMAT EXL2K END -RUN TABLE FILE CAR PRINT RETAIL_COST DEALER_COST BY CAR ON TABLE PCHOLD FORMAT EXL2K END -RUN TABLE FILE EMPLOYEE PRINT * ON TABLE PCHOLD FORMAT EXL2K END
WebFOCUS Integration With Excel capabilities allow: The creation of compound Excel reports that include data from varying sources as multiple, tabbed spreadsheets contained within one Microsoft Excel workbook.
I tried both those examples in 5.2.4. The first one created 2 separate reports, the second one only created the last table file. I got excited there for a moment!
Posts: 68 | Location: Springfield MA | Registered: May 07, 2003
I have the same problem, only the last report can be saved. There is a workaround for that:
In Windows: Explorer on My Computer --> Menu Tools/Folder Options/File Types
Look for .XLS, click on Advanced and UNCHECK the last checkbox.
This will allow WF to open Excel instead of embedding it into your browser. That way you get 3 reports in the same Excel instance and you can save them individually.
I know, this must be done on all users PC, but if like me, only 3 users are using those Excel 'compound' reports, it's no big deal.
We're not going to upgrade to version 5.3 now, we'll wait a bit for all the bugs to be corrected, later next year... So this is what I'm using for the moment.