Video linked for explanation.
I have 7 different HeaderTypes. Which I need to be displayed in a continuous form; similar to grouping on a report. Do not be fooled by the apparent sorted order of the BillTemsF. It appears sorted because correctly because BillHeadersAndItemsT ID has been created in order. In real-use this will not happen with the user making errors/ deleted items... I'm not greatly experienced in reports but I believe they do not allow data manipulation; hence a report is no use. I'm going to be grabbing data from different perspectives so need to grasp this.
Specs
I know several nested tables & nested subforms may be suggested; every application I've used avoids this & displays it as a continual list (just referring to forms here). I imagine also if the header types are isolated the user cannot convert the HeaderType0 - H6 once they have been created; allowing for better flexibility. Not from the dbEngine anyhow, but a complex loop will need to be devised I imagine.
I was thinking of nested subqueries to grab & filter, but been experimenting for a week now & has not been fruitful. Also I know my design is not correct so I need help.
Current Design (Single Header Table)
- Violates 2nd Normal Form; transitive dependancy on ParentHeaderID. Will work for the current Tender but when copied to a new Tender it's reference will not change & incorrectly refer to the same ParentHeaderID.
- Advantages - allows user to change HeaderType allowing restructure of the bill.
- Disadvantages - currently have not ascertained how to sort properly.
View attachment 119448
I have 7 different HeaderTypes. Which I need to be displayed in a continuous form; similar to grouping on a report. Do not be fooled by the apparent sorted order of the BillTemsF. It appears sorted because correctly because BillHeadersAndItemsT ID has been created in order. In real-use this will not happen with the user making errors/ deleted items... I'm not greatly experienced in reports but I believe they do not allow data manipulation; hence a report is no use. I'm going to be grabbing data from different perspectives so need to grasp this.
Specs
- H0 (Sub-Bill) is optional & will not always be used. Having this optional H0 certainly complicates things, but is analytically beneficial for other purposes. If I have to remove it then I have to remove it but I know it is possible as other apps have this.
- H1 Will always be used & dependant on the complexity of the Bill subsequent levels of headers will be used.
- H6 (a Comment) will sometimes be used and is different from H0 - H5; because it is 'nested/ covariant' to whatever parent header it belongs to.
- H7 (a BillItem) is quite different from H0 - H5. Similar to H5 as it is 'nested/ covariant' to a parent header but it is the only record which will contain a Quantity, Rate & Total (in qry).
I know several nested tables & nested subforms may be suggested; every application I've used avoids this & displays it as a continual list (just referring to forms here). I imagine also if the header types are isolated the user cannot convert the HeaderType0 - H6 once they have been created; allowing for better flexibility. Not from the dbEngine anyhow, but a complex loop will need to be devised I imagine.
I was thinking of nested subqueries to grab & filter, but been experimenting for a week now & has not been fruitful. Also I know my design is not correct so I need help.
Current Design (Single Header Table)
- Violates 2nd Normal Form; transitive dependancy on ParentHeaderID. Will work for the current Tender but when copied to a new Tender it's reference will not change & incorrectly refer to the same ParentHeaderID.
- Advantages - allows user to change HeaderType allowing restructure of the bill.
- Disadvantages - currently have not ascertained how to sort properly.
View attachment 119448
Attachments
Last edited: