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.
Here's what I'm trying to do. I have a compound report that I want to burst using a dynamic address in Report Caster.
First there would be a job to get a list of countries that the compound report would be run for.
TABLE FILE CAR
PRINT
COUNTRY
WHERE COUNTRY IN ('ENGLAND', 'JAPAN', 'ITALY');
ON TABLE PCHOLD
END
Then the compound report would need to be run for each of the countries in the list.
TABLE FILE CAR
PRINT
RETAIL_COST
DEALER_COST
BY COUNTRY NOPRINT
BY BODYTYPE
BY MODEL
ON COUNTRY SUBHEAD
"<COUNTRY"
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE PCHOLD FORMAT PDF OPEN
END
TABLE FILE CAR
SUM
RETAIL_COST
DEALER_COST
COMPUTE VAR/D12.2 = RETAIL_COST - DEALER_COST; AS 'VARIANCE'
BY COUNTRY NOPRINT
BY BODYTYPE
ON COUNTRY SUBHEAD
"<COUNTRY"
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE PCHOLD FORMAT PDF CLOSE
END
Then the distribution would run a job that would get the email address for each country.
VALUE DEST
ENGLAND BOB@XYZ.COM
ITALY FRANK@XYZ.COM
JAPAN LISA@XYZ.COM
W GERMANY JOE@XYZ.COM
I'm sure this is possible, but I don't know how to create the loop to run the complete compound report for each COUNTRY value and store the output for bursting.
Thanks for your suggestions. Bethany
Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
Just so happens I just completed one, so, here's some code:
TABLE FILE CAR
SUM
COUNTRY
BY COUNTRY NOPRINT
ON TABLE SAVE AS MGR_LIST
END
-RUN
-*******************************************************************************
-SET &MAXCNT = &LINES;
-SET &CNTR = 0;
-REPEAT BEG_LOOP WHILE &IORETURN EQ 0;
-READ MGR_LIST NOCLOSE &COUNTRY.A16.
-SET &CNTR = &CNTR + 1;
-SET &OPEN_CLOSE = IF &CNTR EQ 1 THEN 'OPEN' ELSE
- IF &CNTR EQ &MAXCNT THEN 'CLOSE' ELSE ' ';
-*******************************************************************************
TABLE FILE CAR
PRINT
RETAIL_COST
DEALER_COST
BY COUNTRY NOPRINT
BY BODYTYPE
BY MODEL
ON COUNTRY SUBHEAD
"<COUNTRY"
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE PCHOLD FORMAT PDF &OPEN_CLOSE
END
-RUN
-IF &CNTR EQ &MAXCNT GOTO EOJ;
-BEG_LOOP
-EOJ
-EXIT
This works, just tested. Moved COUNTRY to the HEADING..
TABLE FILE CAR
SUM
COUNTRY
BY COUNTRY NOPRINT
ON TABLE SAVE AS MGR_LIST
END
-RUN
-*******************************************************************************
-SET &MAXCNT = &LINES;
-SET &CNTR = 0;
-REPEAT BEG_LOOP &MAXCNT TIMES
-READ MGR_LIST NOCLOSE &COUNTRY.A10.
-SET &CNTR = &CNTR + 1;
-SET &OPEN_CLOSE = IF &CNTR EQ 1 THEN 'OPEN' ELSE
- IF &CNTR EQ &MAXCNT THEN 'CLOSE' ELSE ' ';
-*******************************************************************************
TABLE FILE CAR
HEADING CENTER
"<COUNTRY </1"
PRINT
RETAIL_COST
DEALER_COST
BY COUNTRY NOPRINT
BY BODYTYPE
BY MODEL
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE PCHOLD FORMAT PDF &OPEN_CLOSE
END
-RUN
-IF &CNTR EQ &MAXCNT GOTO EOJ;
-BEG_LOOP
-EOJ
-EXIT
I use the Dynamic Address List, which is the focexec that creates the distribution list, not a pre-processing fex from the Advanced button(I "think" that's what you are doing).
When you select Dynamic Address List, there will be a button to double-click on that will list all application domains, then the focexec's; select the email list focexec.
For your example, you'll need:
DEFINE FILE CAR
-* X_MGR/A55 = '&MO_C.EVAL' || ' ' | '&FY.EVAL' | ' - ' | F_MGR;
X_ADDR/A30 = DECODE COUNTRY (
'ENGLAND' 'Bethany@IBIFocalPoint.com'
'FRANCE' 'Tom@IBIFocalPoint.com
continue on with the other countries...
ELSE ' ');
END
TABLE FILE CAR
SUM
COUNTRY AS 'VALUE'
X_ADDR AS 'DEST'
ON TABLE PCHOLD
END
-RUN
Then, you schedule your compound job and ReportCaster will take care of the rest...
I don't know if I'm being overly simplistic about this, but it seems that all that needs to be done is create a coordinated compound PDF report and distribute it using a dynamic distribution list. We have done this in several apps. No need for loops and counters and such. All three reports are run, sorted together, burst, and distributed to the email associated with a country via a dynamic distribution list. I can work through some sample CAR code next week, if needed.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
PLEASE do. I set counters to use one set of code to OPEN and CLOSE. I distribute an EXCEL workbook to 180 managers; maybe I'm doing to much; don't know.
Please share your thoughts and code, much appreciated...
Your basic compound report is already as it should be, but just remove the line(s) "where country eq ...". that is not needed since the burst value takes care of this.
In the RC setup you say this should be a burst report.
then you either create the static burst value list with the fixed mail adresses and that is it.
No looping or other complex things.
If your address list should be dynamic then you create a fex that builds that XML file on the fly.
BTW The compound report itself could be done in one report. Take a look at "multiverb" possibilities.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
The reports I'm trying to burst are an account summary and then transaction detail and payroll details. The final output is pulled from different tables so I don't think a multiverb report is possible.
I tried to make this really simple and create 3 car reports and put them all into a report caster job with 3 tasks. This worked, sort of. Each person on the distribution list got 3 files for each country. Since I had 2 countries on the distribution file, I got 6 total PDF attachments. Ideally, I would like for each person to get one PDF attachment (including Spec Report, Cost Difference Report, and Average Cost Report) for each country they are assigned to.
Files used:
Spec Report
TABLE FILE CAR
PRINT
LENGTH
WIDTH
BY COUNTRY
BY BODYTYPE
BY MODEL
HEADING
"CAR SPECS"
ON TABLE PCHOLD FORMAT PDF
END
Cost Report
TABLE FILE CAR
PRINT
COMPUTE MODEL2/A15 = EDIT(MODEL, '999999999999999');
DEALER_COST AS DCOST
RETAIL_COST AS RCOST
COMPUTE DIFF/D12.2 = RETAIL_COST - DEALER_COST;
BY COUNTRY
BY BODYTYPE
HEADING
"COST DIFFERENCES"
ON TABLE PCHOLD FORMAT PDF
END
Average Cost Report
TABLE FILE CAR
SUM
AVE.DEALER_COST
AVE.RETAIL_COST
BY COUNTRY
BY BODYTYPE
HEADING
"AVERAGE COST"
ON TABLE PCHOLD FORMAT PDF
END
I also tried setting up the RC job to have one task that runs all of the reports from a single fex.
SET COMPOUND = OPEN
-INCLUDE CARFILE1
SET COMPOUND = OPEN
-INCLUDE CARFILE2
SET COMPOUND = CLOSE
-INCLUDE CARFILE3
-EXIT
For this run, I received 2 files but each only had the Average Cost Report output for each country.
Bethany
Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
I also tried creating a coordinated compound report with the PDF layout painter. When I burst the output, each user got one PDF for each country assigned to them; however, we each got 5 pages for each file with the Average Cost repeated on all 5 pages, but nothing of the other 2 reports.
Any ideas???
BethanyThis message has been edited. Last edited by: Bethany,
Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server