Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Rows that don't exist

Status
Not open for further replies.

floydome

Technical User
Feb 27, 2007
9
US
Hi,
I am working on a report and need to display additional rows that don't exist.
Eg.
Tenure 00-01 Headcount 15
Tenure 01-02 Headcount 20
Tenure 03-04 Headcount 10
Tenure 04-05 Headcount 5

In this example there is no one with Tenure 02-03, I want to display Tenure 02-03 and Headcount 0, instead of not displaying it at all.
I appreciate any help
Thanks
Floyd
 
No i have not. will this work with McGuyer?
 
What's the structure of your table(s)? Are we talking multi-segment (parent-child), where tenure is parent of headcount? If so, then you can SET ALL=ON, to get parent instances without children. OTW, how does the report KNOW about tenure 02-03?
 
The table consist of Fields - Tenure , Headcount , Joblevel etc
There are some job levels that have headcount in each tenure while there are some that are missing headcount in some tenures. My goal is to display all tenures. Once i can display all tenures for each joblevel, then i have some furthur calculations. I will try Set all = on. Hopefully it works
Thanks
 
In your report, you can EXPLICITLY specify which rows you want, and in which order, by using the ROWS command. Assuming you have a field which is called something like TENRNG, like this, for each field:
Code:
TENRNG/I2 = IF TENURE FROM 0 TO 1 THEN 1 ELSE
            IF TENURE FROM 1 TO 2 THEN 2 ELSE ...

You can code something like this:
Code:
SUM TENURE FOR TENRNG
1 AS 'Tenure 00-01 Headcount' OVER
2 AS 'Tenure 01-02 Headcount OVER ...

This use the FRL facility of the TABLE command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top