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.
Hi, Simplified example: My table has a balance for month1 and month2, but since there is no balance for month3, there is no record for month3. However, on the held file to export, I still need to have a record for month3. So, needs to look something like this:
Anybody know a quick and dirty way to do this? I was thinking something like this:
TABLE FILE MYTABLE PRINT DEPT BALANCE BY MONTH NOPRINT BY MONTH ROWS 1 OVER 2 OVER 3 END
That gives me the blank record I'm looking for, but I would still have to fill the department number. Not a big deal in my example, but when you have more fields and not knowing which month is going to be blank for which department, gets a little tougher. Thanks!This message has been edited. Last edited by: Mark1,
Quick and dirty, I am afraid not. But there is a way to do what you want to do.
First, create a separate table (TMPTABLE) with three columns, MONTH, DEPT, BALANCE. Make sure that the metadata for these feilds is exactly the same as the matching columns in your table MYTABLE. Now populate this new table with every possible combination of month & department, and the BALANCE column with the value of 0 (zero). This could be a separate database table, or even a FOCUS table that is created / refreshed on a regular basis, perhaps even via the report caster. In any case, index the table on MONTH and DEPT.
Now, in your report do a MORE step:
TABLE FILE MYTABLE
SUM BALANCE
BY MONTH
BY DEPT
MORE
FILE TMPTABLE
SUM BALANCE
BY MONTH
BY DEPT
FILE MYTABLE
SUM BALANCE
BY MONTH
BY DEPT
This should "fill in the spaces" for you.
Robert F. Bowley Jr. Owner TaRa Solutions, LLC
In WebFOCUS since 2001
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005
Create a table that holds the months/dept combinations and fill it will all months/dept combinations that you may want to report on at any given moment. Then join this table based on the month/dept to all instances of your balance (MYTABLE) table month/dept - don't forget to set ALL to be ON or PASS.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
... or in code ... Think of the CAR file. There are 5 countries and 10 cars between them. How would you obtain every combination of country and car possible (e.g. 50 records)?
Answer - use McGyver technique
DEFINE FILE CAR
MCGYVER_KEY/A1 = '';
END
TABLE FILE CAR
PRINT COUNTRY
BY MCGYVER_KEY
ON TABLE HOLD AS MCGYVER1
END
TABLE FILE CAR
PRINT CAR
BY MCGYVER_KEY
ON TABLE HOLD AS MCGYVER2 FORMAT XFOCUS INDEX MCGYVER_KEY
END
JOIN CLEAR *
JOIN MCGYVER_KEY IN MCGYVER1 TO MULTIPLE MCGYVER_KEY IN MCGYVER2 AS J1
TABLE FILE MCGYVER1
PRINT COUNTRY
CAR
END
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