Avatar of Ryan Rood
Ryan Rood
Flag for Canada

asked on 

Crystal Reports Formula Editor

Good morning,
I am modifying a Crystal Report and having some issues. Essentially I need to add a filter to see if a string of text exists in the record and then omit if it does. Here is the current code. I need to add something like this

IF InStr({OrderHeader.ManualDescription}, "Trim 1") THEN 0

I have noted where I believe the new data chunk should go (hopefully). Long story short - if the OrderHeader.ManualDescription is going to be used I need to check it first for "Trim 1" and omit it.

Shared numbervar oldLinkedToLineID;
Shared numbervar curLinkedToLineID;

stringvar strIndent := "";

If oldLinkedToLineID = curLinkedToLineID and curLinkedToLineID > 0 Then strIndent := " -> ";

If {OrderHeader.LineType} = 1 Then //Product
(
    // POTENTIAL NEW CODE INSERTION HERE?
    If IsNull({OrderHeader.ManualDescription}) Then
        strIndent + {OrderHeader.Description}
    Else
        strIndent + {OrderHeader.ManualDescription}
)
Else If {OrderHeader.LineType} = 2 Then // Profile
(
    strIndent + {OrderHeader.ManualDescription}
)
Else
(
    If IsNull({OrderHeader.ManualDescription}) Then
        strIndent + {OrderHeader.ManualCode}
    Else
        // POTENTIAL NEW CODE INSERTION HERE?
        strIndent + {OrderHeader.ManualDescription}
)   

Open in new window


Thank you in advance for any guidance here.

Ryan
Crystal Reports

Avatar of undefined
Last Comment
James0628

8/22/2022 - Mon