ICITEMO Optional Field on Order Entry

SUGGESTED

Hi,

I have created several optional fields in Inventory Control to an Item.

When I link the table ICITEMO to the Order Entry Lines by Item, I do not know how to pick the correct optional field from ICITEMO. I have 5 optional fields, but it seems to only pull the first one. How do I select the others? It would be nice if Sage 300 created a new custom field for every Optional field is created? If they did this, it would be easier to grab the correct Optional Field.

Does anyone have suggestions on how to pick the correct optional field when you have multiple Optional fields to an Item?

  • 0
    For each optional field that you want to include in your report you can add the ICITEMO table. When you add the second (or subsequent) ICITEMO table Crystal will ask you to give the table a different name. This is called an Alias. Make sure that your table links are left outer joins from icitem to icitemo. In Crystal this will appear as an arrow pointing to the icitemo table (or the aliased tables).

    Then, in the designer, you'll see the icitemo and the alias tables and you can include the fields on your report as you'd expect.

    An alternate way to include optional fields in a Crystal report is to use sub-reports. And a third way is to enter your own SQL as a command object into your report and use sub-select statements to retrieve the optional field values that you want. Both of these alternates are more complicated topics. Sub-reports, as an aside, are a very powerful feature of Crystal that would be worth studying.
  • 0
    Use subreports to pull in the optional fields. If you link ICITEMO and there are 5 optional fields then each detail records will be pulled in 5 times - once for each optional field value.
  • 0
    Go to youtube and search for crystal subreports...
  • 0
    Hey buddy,
    not sure if you ever got this sorted but I do ALOT of this type of reporting and ended up getting round it by doing a series of stored procedures in SQL (not sure what DB you are using but this should be possible in pervasive also). My IC one looks like this.

    SELECT
    ICITEM.ITEMNO, OPTFLD1.VALUE AS [OPTFLD1],OPTFLD2.VALUE AS [OPTFLD2]
    FROM
    ICITEM ICITEM
    INNER JOIN ICITEMO OPTFLD1 ON (ICITEM.ITEMNO = OPTFLD1.ITEMNO AND OPTFLD1.OPTFIELD = 'UNITS')
    INNER JOIN ICITEMO OPTFLD2 ON (ICITEM.ITEMNO = OPTFLD2.ITEMNO AND OPTFLD2.OPTFIELD = 'EOMBONUS')

    Units and EomBonus are my two optional fields and this proc tabulates them into two columns next to the applicable item so that when I run the crystal report I can just pull the applicable value for each item. Alot more straight forward than doing through a sub-report and can be used in multiple reports until you add another dfield and then just add another join :)
    Good luck,
    Az
  • 0
    SUGGESTED
    Just put a filter in your report, ICITEMO.OPTFIELD = "xxx". But if you need to add subtotals, etc then you have to use a subreport.