Focal Point
[CLOSED] Reporting multiple Descriptive lines

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3517037395

November 15, 2010, 04:57 PM
Carlf
[CLOSED] Reporting multiple Descriptive lines
I have a database that can be described as follows:

Inovice header has 1 to many line items.

Each line item has 1 to many Line Item Descriptions

Also, Each Line Item has 1 to many Line Item Special Instructions.


If I join The Header to he line Item and also to the Line Item Description and Special Instruction tables, when I report the Line Item amount, I'm getting a duplicate/triplicate situation when I have multiple Line Item descriptions and Special Instructions.


What I would like the report to look like is this:

Hdr # LI # LI Amt LI Desc LI Spec Instr
----- ---- ------ ------ ------------
1 1 10.00 Des 1 SI 1
Des 2 SI 2
Des 3
2 20.00 Des 1 SI 1
Des 2
2 1 30.00 Des 1 SI 1
Des 2 SI 2



I hope this makes sense. Anybody have any hints on how to do this? I know I did it a couple years ago, and I can't remember how I did it.


Thanks,

Carl

This message has been edited. Last edited by: Kerry,


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
November 15, 2010, 05:03 PM
Carlf
Hdr # LI # LI Amt LI Desc LI Spec Instr
----- ---- ------ ------ ------------
1..... 1... 10.00 Des 1.. SI 1
..................Des 2.. SI 2
..................Des 3
.......2... 20.00 Des 1.. SI 1
..................Des 2

2..... 1... 30.00 Des 1.. SI 1
..................Des 2.. SI 2


Carl

FOCUS 7.1.6 on Windows XP
Output: Excel, HTML, PDF
November 16, 2010, 08:05 AM
njsden
Carlf, please enclose your sample output using the </> button in your "Post" window.

As for the duplicates, it is a normal behaviour when joining tables in a one-to-many relation.

That should not be a problem with WebFOCUS which does not print "duplicate" values when you display your parent-wise fields as BY fields.

TABLE FILE blah
PRINT LN_SPEC_INSTR
BY HDR_NO
BY LN_N
BY LN_AMT
BY LN_DESC
END


Hope this helps.

- Neftali.



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.
November 16, 2010, 08:07 AM
njsden
quote:
That should not be a problem with WebFOCUS which does not print "duplicate" values when you display your parent-wise fields as BY fields


The above is of course applicable unless you have SET BYDISPLAY = ON.



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.