option Value not appearing in the field

sathangaisathangai Member Posts: 25
hi all,

In the salesline item table,i have taken the field(Excise account type, option datatype).
i have entered 8 values<a,b,c,..h>. when executing the salesorder form the value comes fine and when moving to report(Order confirmation) i got only the numbers in print(if iam choosing B it comes 2 and for D 4.......)..
Iam a newbie..
what i need to do to do for the selected option value to come in the report?
is there any code to be written?..if yes give me n i'll learn with that
iam using NAV 2009 with classic client and sqlserver....
...Thank you

Comments

  • SavatageSavatage Member Posts: 7,142
  • krikikriki Member, Moderator Posts: 9,115
    [Topic moved from 'NAV 2009' forum to 'SQL General' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • strykstryk Member Posts: 645
    Hi!

    You should make sure your Option Field contains not only the "Option String" but also the "Option Captions" for the required Language Layers!
    Further, you might look into the FORMAT command (if applicable).

    Kind regards,
    Jörg
    Jörg A. Stryk (MVP - Dynamics NAV)
    NAV/SQL Performance Optimization & Troubleshooting
    STRYK System Improvement
    The Blog - The Book - The Tool
  • sathangaisathangai Member Posts: 25
    Thanks Savatage and stryke....

    let u know what happened when iam choosing by applying the changes....
  • sri.tech23sri.tech23 Member Posts: 41
    I have used the foll type of code.. c if it works for you... optmonth is type option with OptionString = ,January,February,March,April,May,June,July,August,September,October,November,December and intmonth is of type Integer. u can use this in pre data item trigger of report if u want to apply filter on dataitem depending on selection of option type.
    CASE optmonth OF
    optmonth::January:intmonth:=1;
    optmonth::February:intmonth:=2;
    optmonth::March:intmonth:=3;
    optmonth::April:intmonth:=4;
    optmonth::May:intmonth:=5;
    optmonth::June:intmonth:=6;
    optmonth::July:intmonth:=7;
    optmonth::August:intmonth:=8;
    optmonth::September:intmonth:=9;
    optmonth::October:intmonth:=10;
    optmonth::November:intmonth:=11;
    optmonth::December:intmonth:=12;
    END;
    
  • strykstryk Member Posts: 645
    sri.tech23 wrote:
    I have used the foll type of code.. c if it works for you... optmonth is type option with OptionString = ,January,February,March,April,May,June,July,August,September,October,November,December and intmonth is of type Integer. u can use this in pre data item trigger of report if u want to apply filter on dataitem depending on selection of option type.
    CASE optmonth OF
    optmonth::January:intmonth:=1;
    optmonth::February:intmonth:=2;
    optmonth::March:intmonth:=3;
    optmonth::April:intmonth:=4;
    optmonth::May:intmonth:=5;
    optmonth::June:intmonth:=6;
    optmonth::July:intmonth:=7;
    optmonth::August:intmonth:=8;
    optmonth::September:intmonth:=9;
    optmonth::October:intmonth:=10;
    optmonth::November:intmonth:=11;
    optmonth::December:intmonth:=12;
    END;
    

    This should be enough:
    EVALUATE(intmonth, FORMAT(optmonth, 0, '<Number>'));
    
    Jörg A. Stryk (MVP - Dynamics NAV)
    NAV/SQL Performance Optimization & Troubleshooting
    STRYK System Improvement
    The Blog - The Book - The Tool
  • sathangaisathangai Member Posts: 25
    Thanks stryk,sritech.23,savatage........it works for me........thank you for your valuble replies....and i'll learn........
Sign In or Register to comment.