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 am having a small problem regarding arranging of different data from two different tables.
For example:
There are two tables Employee and Car I want to extract out all the information of the cars owned by an employee. I want them to be clubbed together in the report
The output should be like below
Owners Information Name, Emp No, Designation Sam D’zouza, 100, Manager
Car Information Model, Vehicle Number Chevrolet, 1234 Audi, 5676 Ferrari, 6666
Owners Information Name, Emp No, Designation Tom Brown, 101, Sr. Engineer
Car Information Model, Vehicle Number Audi, 5555
And so on….
I am stuck on how to compare the employee name associated with each car.This message has been edited. Last edited by: Kerry,
Webfocus 7.7.03 Windows XP Excel, PDF, HTML, APDF, AHTML, Maintain
Use subheadings for your displays. JOIN EMP_NUMBER IN EMPLOYEE TO ALL EMP_NUMBER IN CAR TABLE FILE EMPLOYEE PRINT MODEL AS '' VEHICLE_NUMBER AS '' BY EMPL_NUMBER NOPRINT SUBHEAD "Employee Information" ", , BY MODEL NOPRINT SUBHEAD "Car Information" "Model Vehicle Number" END
You can then use your style sheet to assign fonts etc.
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006
Now build a report using MATCH. Run this as is to begin with and then change the first PRINT to SUM instead and see the resultant output.
MATCH FILE SW_EMPFILE
PRINT EMP_NAME
-* SUM EMP_NAME
BY EMP_NO
RUN
FILE SW_CARFILE
PRINT CAR_MAKE
BY EMP_NO
AFTER MATCH HOLD OLD
END
TABLE FILE HOLD
PRINT EMP_NAME
CAR_MAKE
BY EMP_NO
END
Now see how you can do the same with a join and therefore handle the data only once.
JOIN CLEAR *
JOIN EMP_NO IN SW_EMPFILE TO MULTIPLE EMP_NO IN SW_CARFILE AS J1
TABLE FILE SW_EMPFILE
PRINT EMP_NAME
CAR_MAKE
BY EMP_NO
END
I'll leave you to take Hua's suggestion on board for formatting.
Seasons greetings!
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
You are all making it way more complicated than youe need to. Why use a MATCH when you can use a one to many join. Apart from the small typo the code I suggested should do the job. Have you tried it (with appropriate changes to column names etc?
This line ", , BY MODEL NOPRINT SUBHEAD should be BY MODEL NOPRINT SUBHEAD
You do not need to use MATCH.
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006