Get dataitem / filter on request form

madmmadm Member Posts: 92
edited 2005-03-10 in Navision Attain
i have created a report with the data items Customer / Value which shows items sales by customer.

Although working, i now need to filter on a particular field in the item card, so rather than adding the item dataitem to the report, i have done this as a GET item as :



Item.GET("Value Entry"."Item No.");
IF Item."FIELD" = ABC THEN
CurrReport.SKIP;

I have then decared a G.V (type Code) called ABC, and then added this into the request form.

The report does work by excluding the ABC entry when run. HOwever, if i want to put a string such as 1|2|3 into ABC then it does not skip any entries (presume it sees it as 1|2|3).

Is there anyway of filtering in this manner on the request form?

Thanks

Comments

  • SavatageSavatage Member Posts: 7,142
    which shows items sales by customer.
    why not use
    CUSTOMER/ITEM LEDGER ENTRIES
    or
    CUSTOMER/SALES INVOICE LINE
    for your report?

    I think that would make life easier :-k

    What field from the item card do you need?
  • madmmadm Member Posts: 92
    Savatage wrote:
    which shows items sales by customer.
    why not use
    CUSTOMER/ITEM LEDGER ENTRIES
    or
    CUSTOMER/SALES INVOICE LINE
    for your report?

    I think that would make life easier :-k

    What field from the item card do you need?

    as rule, anything based on sales i use the value entry table as this includes any item charges etc etc.

    the field i am trying to bring through, is not a standard field in Navision, but an addition in our database. It is basically a legal classification that we assign to the item, however, this is not carried though on to the sales etc. if i was to use the other suggested tables then i would have the same problem.


    i could add the item as another data item, but then this could affect the running of the report?
  • awarnawarn Member Posts: 261
    Format will be something like this:

    Item.Setcurrentkey("Value Entry", "FIELD");
    Item.setrange("Value Entry"."Item No.");
    Item.setfilter("FIELD", ABC);
    if not Item.FIND('-') then
    CurrReport.SKIP;

    It will work best if you use the proper key, you may have to add it.

    -a
Sign In or Register to comment.