Crystal Reports / sub reports / Alias Items

SOLVED

I need some help with a form and sub report that we are using to obtain the alias part descriptions for some of our forms.

My issue is that I wish to ignore all the C type (customer type) alias data and only use the G type (general) details. 

The sub report appears to be working properly and only giving me the data that is desired however the crystal report is further using the C type details if the inventory item has this type of alias as well it is  then printing both my alias description PLUS my inventory description.

My  goal is to print the Item description of the Alias G type if it exists or always print my Inventory item description (not both)

Type item code item description
Inventory 123 ABC
Alias "G" 123 ZZZ
Alias "C" ABC ABC
My goal is to print the "G" description ONLY, if present
OR
print the item description ONLY if "G" is not present

Any help on how to accomplish this task would be greatful.

  • +1
    verified answer

    Subreport of IM_AliasItem, located in a section above where you want to use the description, filtered by ItemCode and "G" type. 

    Suppress blank section, suppress blank sub-report (...do not just suppress the section containing the sub-report or it won't run).

    Use a global / shared variable to pass the value out to the main report (adding a reset somewhere appropriate, often best in a section above where the sub-report is located), then in the main report, use a formula to use the shared variable value when not blank...