Title: | FOCUS, from INFORMATION BUILDERS |
Moderator: | ZAYIUS::BROUILLETTE |
Created: | Thu Feb 19 1987 |
Last Modified: | Mon May 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 615 |
Total number of notes: | 1779 |
I need some help... I have an RDB with a header (H) relation and another relation that is detail (D), i.e., there may be many D's to a single H. (You might say I am dealing with a Bill Of Materials...) How can I get FOCUS to NOT repeat the H everytime it prints a D? Here is an example of a report I am trying to produce: Hfield1 Hfield2 Hfield3 Hfield4 Hfield5 Dfield1 Dfield2 Dfield1 Dfield2 Dfield1 Dfield2 What I get is the following: Hfield1 Hfield2 Hfield3 Hfield4 Hfield5 Dfield1 Dfield2 Hfield1 Hfield2 Hfield3 Hfield4 Hfield5 Dfield1 Dfield2 Hfield1 Hfield2 Hfield3 Hfield4 Hfield5 Dfield1 Dfield2 I used the following FOCUS commands/statements: TABLE FILE whatever PRINT HFIELD1 HFIELD2 HFIELD3 HFIELD4 HFIELD5 DFIELD1 DFIELD2 BY HFIELD1 BY HFIELD2 BY HFIELD3 BY HFIELD4 BY HFIELD5 Selection criteria 1 Selection criteria 2 END Can anyone can point me in the right direction? Thanks, Don
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
450.1 | BY the way... | RUNTUF::IMFRA | Tue Aug 20 1991 16:18 | 5 | |
Reference the Hfields via the BY statements only, then the only time an Hfield will be printed is when there's a change in the sort order of the "header" fields. | |||||
450.2 | It WORKS! Here's an example of the .FEX | SOLVIT::SOULE | Pursuing Synergy... | Wed Aug 21 1991 12:27 | 25 |
Many thanks to .1 - it was a great tip... For those of you with the same type of problem, my final .FEX that WORKS looks like this: TABLE FILE whatever PRINT DFIELD1 AS 'Label 6' IN +3 DFIELD2 AS 'Label 7' IN +3 BY HFIELD1 AS 'Label 1' IN +3 UNDER-LINE BY HFIELD2 AS 'Label 2' IN +3 SKIP-LINE BY HFIELD3 AS 'Label 3' IN +3 BY HFIELD4 AS 'Label 4' IN +3 BY HFIELD5 AS 'Label 5' IN +3 Selection criteria 1 Selection criteria 2 HEADING CENTER "This is the Main Title" "This is another line in the Title" "Report Run &DATE &TOD Source: whatever" " " FOOTING CENTER " " "DIGITAL INTERNAL USE ONLY" END |