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

    change report field text based on db value

    I am new to crystal reports ..guys pls help me in this thing

    in my data set I have fld PAYMENT_TYPE fld,and this data set connecting with crystal report calld
    I need to do this inside this report.and data set contains many records
    when PAYMENT_TYPE=1 disply "cash"
    when PAYMENT_TYPE=2 disply "cc"

    how can i do this

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

    Re: change report field text based on db value

    Insert a new formula field, call it the name you like
    Inside the formula editor, write
    Code:
    If {TableName.FieldName}=1 Then "Cash" Else
    If {TableName.FieldName}=2 Then "CC" Else "Other"
    After that, place the formula in the desired rpt section
    Note: Replace TableName and FielName with real ones
    Here we are assuming that the field is numeric type

    JG

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