expression to show or hide for option data type in report design

I have created a report for item ledger entry in which i have created two separate table in the report designer view of visual studio with field Item no., Entry type, Quantity ,Cost actual amount. In one table i want to show the entry type i.e Positive Adjmt. and in another Negative Adjmt.

Which version of NAV is this? Classic or RDLC?

Hi,
For Option Value Either you can equate it with the Value Like -
Entry_Type = “Positive Adjmt.”
OR with the integer equivalent to it like -
Entry_Type = 2

RDLC

Hey Bittu,

Did you tried applying Filters over there in Visual Studio. As you have taken two different Tables in Visual studio, so in the first table apply a filter with - Field - ‘Entry Type’, Operator-’ =’, Value - “Positive Adjmt.”. In the Second table too with the same filter but Value Negative Adjustment.

on which field should i apply the filter i.e item no. or entry type.

Entry Type.

hi rock

i have applied the filters to both tables as you said but the first table is showing all Positive Adjmt. but 2nd table is not showing any Negative Adjmt.

Hey Bittu,

If it worked for Positive Adjustment then it should work for Negative Adjustment as well, Make Sure in the value you are passing the same string as it comes, the same way you mapped for Positive Adjustment.

Check the About this Page of the Report as well and make sure negative adjustment entries are coming there.

hey rock

i have checked all the things you said, it is still not working , i am sending you the screenshot.

HI Bittu,
I think the Silly Mistake might be You have Set Group on Property i.e Group Expression…please Remove that Group Expressions and Let Us Know If Helped…

Bittu,

You need to make the Exact Replica of the First Table, because both are same apart from the different Entry Type.

Try this -

Delete the Second Table and copy paste the First Table. Now navigate to the same Filter location and update it with Negative Adjustment. If its its not working then there some different reason for this.

Hi,

Is not good idea to use option string as filter (Entry_Type = “Positive Adjmt.”) because if you choose another language, option string can have another value.

Use option value.
For Example declare a variable as integer and fill it on C/Al.

Item Ledger Entry - OnAfterGetRecord()
//Purchase,Sale,Positive Adjmt.,Negative Adjmt.,Transfer,Consumption,Output, ,Assembly Consumption,Assembly Output
CASE “Item Ledger Entry”.“Entry Type” OF
“Item Ledger Entry”.“Entry Type”::Purchase:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::Purchase;
“Item Ledger Entry”.“Entry Type”::Sale:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::Sale;
“Item Ledger Entry”.“Entry Type”::“Positive Adjmt.”:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::“Positive Adjmt.”;
“Item Ledger Entry”.“Entry Type”::“Negative Adjmt.”:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::“Negative Adjmt.”;
“Item Ledger Entry”.“Entry Type”::Transfer:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::Transfer;
“Item Ledger Entry”.“Entry Type”::Consumption:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::Consumption;
“Item Ledger Entry”.“Entry Type”::Output:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::Output;
“Item Ledger Entry”.“Entry Type”::" “:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::” ";
“Item Ledger Entry”.“Entry Type”::“Assembly Consumption”:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::“Assembly Consumption”;
“Item Ledger Entry”.“Entry Type”::“Assembly Output”:
EntrTypeInt := “Item Ledger Entry”.“Entry Type”::“Assembly Output”;
END;