CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    Replace Database Field in Crystal Reports

    I've linked the crystal report to a database, now i need some help in manipulating the database field. For example,the field consists of "P" (stands for PASS) or "F" (stands for fail) but i want to display PASS / FAIL instead of P/F ...can someone help me on this? do i need to use a formula or something? i'm very very new to crystal reports... Thankx

    emails will be welcomed. pls email to this address [email protected]


  2. #2
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: Replace Database Field in Crystal Reports

    yes. you need to use a formula
    do the following
    on the menu goto Insert-> formula field.
    in the formula text type
    if {Query.fieldname}="P" then
    "Pass"
    else
    "Fail"

    where fieldname is the field you are checking against.
    Save the formula and place it on your report.
    Hope this helps


  3. #3
    Guest

    Re: Replace Database Field in Crystal Reports

    erm...the way u suggested can't work...are there any other ways? i tried inserting the formula on the specific section but it still dosen't work. The database field is of type char and length 1 as i've said earlier, i wanted the value "P" to be displayed as "Pass" which is of length 4. i've tried putting this in the details section code
    if Field2.value = "P" then
    Field2.value = "pass"
    end if



    this still dosen't work whereby Field2 is a report field. ..really at a loss now ...can u pls leave ur email address TH1?



  4. #4
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: Replace Database Field in Crystal Reports

    First of all what version of crystal reports are you using.
    I use version 7 and I use formulas for this sort of thing all the time.
    If you want to Email me directly send to
    [email protected]
    remove nospam


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