Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] blank record issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] blank record issue
 Login/Join
 
Platinum Member
posted
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:

month1,deptA,10
month2,deptA,15
month3,deptA,0
month1,deptB,20
month2,deptB,0
month3,deptB,10

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,


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Platinum Member
posted Hide Post
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, 2005Report This Post
Virtuoso
posted Hide Post
Nice! Very interesting technique, Robert.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
Twisting your own example....

TABLE FILE MYTABLE
PRINT BALANCE
BY DEPT
BY MONTH ROWS 1 OVER 2 OVER 3
END


And if all the Depts are not there, then the same technque can be done for DEPT. Max two TABLE FILEs.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
This might also work:

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, 2007Report This Post
Expert
posted Hide Post
... 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, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] blank record issue

Copyright © 1996-2020 Information Builders