aaronburro
Programmer
I've got a really simple report I am running that is an Alternate Item report. It shows the items numbers and descriptions of alternate items for each item in our system. The AIs(alternate items) are stored in a table like so:
IM4_AlternateItem
|-----------------|
|ItemNumber |
|AltItemNumber1 |
|AltItemNumber2 |
|... |
|AltItemNumber8 |
|-----------------|
Linking Structure:
--------------------
IM1_InventoryMaster.Item# --> IM4_AlternateItem.Item# (*= LOJ)
I group by IM1_InventoryMaster.Item# and have 9 detail sections. The first section shows only if there are no AIs, and it says "No Alternate Items." *shocker* The next 8 detail sections are reserved for each potential AI, respectively.
Here is the problem: I'd like to show some basic info about the AIs in their respective detail sections, but I can't link back to the IM1 table on Item#, as that obviously creates a cycle, and, it'd be stupid anyway, because it would exclude all the IM1 records (no record has two different item#s, duh). My thought was to create 8 aliases to IM1 and link from the IM4 table to each alias IM1 via IM4_AI.AltItemNumber# to IM1_Alias_#.Item#. So I do that. I can then add the various info from the alias table, but only for one alias. Adding fields from any more than one alias causes the report to generate an error.
The only other method I can think of to make this report involves a subreport for each AIs detail section. That works flawlessly, but it leads to a LOT of subreports being opened (think: 8 subreports per item in our system, potentially).
Am I using the aliases correctly?
IM4_AlternateItem
|-----------------|
|ItemNumber |
|AltItemNumber1 |
|AltItemNumber2 |
|... |
|AltItemNumber8 |
|-----------------|
Linking Structure:
--------------------
IM1_InventoryMaster.Item# --> IM4_AlternateItem.Item# (*= LOJ)
I group by IM1_InventoryMaster.Item# and have 9 detail sections. The first section shows only if there are no AIs, and it says "No Alternate Items." *shocker* The next 8 detail sections are reserved for each potential AI, respectively.
Here is the problem: I'd like to show some basic info about the AIs in their respective detail sections, but I can't link back to the IM1 table on Item#, as that obviously creates a cycle, and, it'd be stupid anyway, because it would exclude all the IM1 records (no record has two different item#s, duh). My thought was to create 8 aliases to IM1 and link from the IM4 table to each alias IM1 via IM4_AI.AltItemNumber# to IM1_Alias_#.Item#. So I do that. I can then add the various info from the alias table, but only for one alias. Adding fields from any more than one alias causes the report to generate an error.
The only other method I can think of to make this report involves a subreport for each AIs detail section. That works flawlessly, but it leads to a LOT of subreports being opened (think: 8 subreports per item in our system, potentially).
Am I using the aliases correctly?