locked
Problem with Calculated Field in Active Reports 3.0 RRS feed

  • Question

  • User-1889275137 posted

    Hi Guys,

    I am an ASP.net developer currently workin with a project where I have to use
    active reports for reporting.

    But the problem is that in a particular case I cannot use active report scripts as well as .net code to format the report output.

    Here I have to implement a simple conditional formula using calculated field only.

    The formula in Active Report 2.0 ---> =IIf(IsNull([City]),"",[City] & " " & [state] & " " & [Zip])

    The case is if city is null then output will be null else it will be city + state + zip

    For this I have tried this once  in Active Report 3.0 --->

    (RecipientCity == "" ? " " : RecipientCity + RecipientState + RecipientZip)


    But it is showing the output of RecipientState + RecipientZip even if city is empty.


    I have tried to test with the following

    (RecipientCity == "" ? " " : RecipientCity)

    It is working when there is no city there is no output but when city is there in the database it is showing in the result field.

    But the (RecipientCity == "" ? " " : RecipientCity + RecipientState + RecipientZip) is not working.

    Do you have any suggestions?

     

    With Regards,

    Upamanyu
     

    Friday, September 30, 2011 7:25 AM

Answers

  • User622904130 posted

    try using

    String.IsNullOrEmpty(City)
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 30, 2011 9:43 AM