Print Page | Close Window

Chr & Previous Function Formula

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22255
Printed Date: 28 Apr 2024 at 9:05pm


Topic: Chr & Previous Function Formula
Posted By: MDAVIS
Subject: Chr & Previous Function Formula
Date Posted: 03 Mar 2017 at 3:06am
    My table.field is called {AC_ECONOMIC.KEYWORD}. Below is showing my KEYWORD results, CHR_FLAG formula and next to it is what I would like my end result to look like incorporating the CHR_FLAG formula. I am not attached to the CHR_FLAG formula so if there is a simpler or more efficient formula to use I am open to suggestions. Basically, I need a formula to replace the quote character with the previous KEYWORD. I first made a formula called CHR_FLAG
CHR_FLAG = IF {AC_ECONOMIC.KEYWORD} = CHR(34) THEN TRUE ELSE FALSE.


                 KEYWORD        CHR_FLAG      END RESULT
RECORD 1: GAS/OIL          FALSE            GAS/OIL
RECORD 2: "                     TRUE             GAS/OIL
RECORD 3: "                     TRUE              GAS/OIL
RECORD 4: "                     TRUE             GAS/OIL
RECORD 5: OIL                  FALSE            OIL
RECORD 6: "                     TRUE              OIL
RECORD 7: GAS                 FALSE             GAS
RECORD 8: WTR/OIL           FALSE            WTR/OIL
ECT...

I then made a formula attempting to use Previous function and it did not work fully. Any help would be greatly appreciated!

Thanks,
Micdavis



-------------
MDAVIS



Replies:
Posted By: DBlank
Date Posted: 03 Mar 2017 at 6:51am
Is this only for visual output or are you expecting to do more calculations on the "end result" field?



Print Page | Close Window