Option String error

Horse06Horse06 Member Posts: 496
edited 2013-11-26 in NAV Three Tier
Hi expert, I have an optionstring (pending and complete), and the content of the textbox is displaying based on the following expression if pending is selected:

=IIF(Fields!Status.value=2,TRUE,FALSE)

When I ran the report it had an error as below:

Redering output for the report failed and the following erro occurred: The hidden expression for the textbox'textbox1' contains an error: inpurt string was not in a correct format.

Please advise! Thank you!

Comments

  • ara3nara3n Member Posts: 9,256
    Have you tried to do the following?

    =IIF(Fields!Status.value='YourOption',TRUE,FALSE)



    Look at the dataset. Is the value actually two? if yes then try '2' instead of just 2
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Horse06Horse06 Member Posts: 496
    Hi expert, thank you for your response! The option variable status is from my table with string pending and complete.
    After I changed to =IIF(Fields!Status.value="pending",TRUE,FALSE), there is no error now. But even if the status is complete, the textbox is still displaying. Please advise! Thank you!
  • ara3nara3n Member Posts: 9,256
    Is it in right case and did you look at the dataset for what nav sends to report?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.