Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal XI Formula

Status
Not open for further replies.

jpeters01

Technical User
Dec 5, 2007
109
US
I am using this select expert formula to pull a line of text from a document:

{document_text_c.line_text} like "*SHIP DATE*"

which returns for example:

SHIP DATE IS 4/30/2009

I also need the next line of text:

SHIP DATE IS 4/30/2009
Payment is required on receipt.

Please help me with the formula.

Thank you,
Jan




 
Hi,
is there a separate {document_text_c.line_text} for each line of text? If not, is there some common way to identify a 'following' line in the text? Will it always have the word payment in it?





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
{document_text_c.line_text} like "*SHIP DATE*" OR
previous({document_text_c.line_text}) like "*SHIP DATE*"

'J

CR8.5 / CRXI - Discovering the impossible
 
Yes, there is a separate {document_text_c.line_text} for each line of text and there is a field document_text_c.line_cnt that I am guessing might be used in the formula. There is no way to identify the following line, no word like 'payment' that is always included. Thx



 
CR85user, thanks for your reply but I tried your formula and I get a message that "This function cannot be used because it must be evaluated later".
 
Hi,
Try something like this:
1: Create a formula ( Not a selection criteria, just a formula to be placed in the report details but supressed)
@WhatLine
Code:
If {document_text_c.line_text} like "*SHIP DATE*"  
Then
document_text_c.line_cnt
Else 0

Then as a Selection formula use:
Code:
If @WhatLine <> 0
Then
document_text_c.line_cnt In [ @WhatLine,(@Whatline + 1) ]






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
For the selection formula I am getting error "A number, currency amount, date-time, or string is expected here." I tried to revise the formula but no luck...thx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top