CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    8

    Change 1=Yes,0=No for each record based on a field

    I have a crystal report with a field that stores 1 or 0. During run time, i want to replace 1=yes,0=no. I cant access the field text box (in the details section named instore1) at all like we do in vb (textbox1.text="Yes")...how can i achieve that?

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Change 1=Yes,0=No for each record based on a field

    Insert a new formula field
    Name it like you want
    Place it in the detail section
    Use the next code if your field is string type (if it isn't then remove delimiters from "1")
    Code:
    If {Tablex.Fieldx} = "1" Then "Yes" Else "No"
    Only change Tablex.Fieldx for the real names
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured