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.
Yes. There was only one trick to it in my environment. Our hub server is Unix, and on a Unix box the template file should not be created mixed case. It must be all lower case. However in the fex it is referenced as upper case.
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'TEMPLATE_EXAMPLE' SHEETNUMBER 1
Where the file is called template_example.mht and is in the same app folder on the hub server. It has 2 worksheets (must be more than 1 according to the doc).
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18 0 EXL2K FILE SAVED ... 0 ERROR AT OR NEAR LINE 22 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC003) THE FIELDNAME IS NOT RECOGNIZED: TABLE BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18 0 EXL2K FILE SAVED ... (FOC3289) EXL2K TEMPLATE FILE: Error opening file (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND
Was missing an "ON" below is the code
APP FI COMPXLSH DISK SMT1.MHT
TABLE FILE CAR PRINT DCOST -*-* Using HOLD instead of PCHOLD and referencing ORIGINAL template file (.mht). -*-* Note that the HOLD AS name is FILEDEF'd or APP FI'd to a file with .mht -*-* extension.SmartBokerTemplate ON TABLE HOLD FORMAT EXL2K TEMPLATE 'SMT' SHEETNUMBER 2 -*ON TABLE PCHOLD AS COMPXLSH FORMAT EXL2K TEMPLATE 'SMARTBOKERTAMPLATE' SHEETNUMBER 2 -*ON TABLE PCHOLD AS COMPXLSH FORMAT EXL2K TEMPLATE 'SmartBokerTemplate' SHEETNUMBER 2 END
TABLE FILE CAR PRINT MODEL -* Since this is the last request, PCHOLD is used instead of HOLD. -* Note that the template filename is the HOLD file (.mht file) from prior -* request. ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'COMPXLSH' SHEETNUMBER 3 END -RUN
trying to keep it a simiple as possible, ust to get it to work.
When you HOLD the file, even though the extension is xht, it has errors. So you may not be able to HOLD a file with WebFocus, and then use the output as input again as a template. In my example I didn't try to do that.
My ultimate goal is to send a compound report to an excel template. My definition of a compound report is where you have multiple quires i.e. On table print field on pchold.. on table print field on pchold..
Most of our excel books have multiple sheets. Each sheet populated with different data. Example sheet 1 has sales, sheet two has customer info, etc. Any ideas
I have an APP folder on the reporting server with two files, one .fex and the other .mht. Because they are in the same folder I do not require a filedef as the .mht file is picked up from the APP PATH at runtime.
To create the .mht file, I created a new Excel workbook with three worksheets. I then saved this as 'EXCELTEMPLATE.mht' to the target directory as a "single file web page". The .fex I ran was -
TABLE FILE CAR
SUM RETAIL_COST
DEALER_COST
BY COUNTRY
SUM RETAIL_COST
DEALER_COST
BY COUNTRY
BY CAR
SUM RETAIL_COST
DEALER_COST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE NOTOTAL
-* Uncomment the following line to get the verbose content.
-*ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'EXCELTEMPLATE' SHEETNUMBER 2
END
-RUN
Worked straight away - no problem.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Sing run like this works great but what I want to do is similar to below
TABLE FILE CAR PRINT DCOST ON TABLE HOLD AS COMPXLSH FORMAT EXL2K TEMPLATE 'SmartBokerTemplate' SHEETNUMBER 2 END TABLE FILE CAR PRINT MODEL ON TABLE PCHOLD FORMAT EXL2K CLOSE TEMPLATE 'COMPXLSH' SHEETNUMBER 3 END -RUN
My ultimate goal is to send a compound report to an excel template. My definition of a compound report is where you have multiple queries i.e. On table print field on pchold.. on table print field on pchold..
I'm not sure you will be able to do that using the template method as it would basically mean opening up a new copy of the web archive for the second output.
Have you considered using BYTOC? This works in a similar manner to RC where the output is split on the first by field. With BYTOC using EXL2K the split is sent to individual worksheets.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
It looks like your ON TABLE HOLD statment is missing an AS phrase.
ON TABLE HOLD AS COMPXLSH FORMAT EXL2K TEMPLATE 'SMT' SHEETNUMBER 2
-* note in the table request -* the template filename is the HOLD file (.mht file) from prior -* request. ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'COMPXLSH' SHEETNUMBER 3
ttfn, kp
Access to most releases from R52x, on multiple platforms.
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003