Print Page | Close Window

Setting Text Value in Code

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=19231
Printed Date: 04 May 2024 at 9:16pm


Topic: Setting Text Value in Code
Posted By: vgillis
Subject: Setting Text Value in Code
Date Posted: 06 Mar 2013 at 5:42am
Hi all.
I have a question that seems like it should be simple..
 
I want to set the text of a text box in code based on a condition in a formula
 
If strString = "N" then
textbox = "NOC"
else
textbox =  "
 
 
 
How do I do this? Please help.
 
 
Thanks!
 



Replies:
Posted By: DBlank
Date Posted: 06 Mar 2013 at 7:02am
you can either create a formula field and display it on the canvas (or insert it into a text box if you need to
If strString = "N" then "NOC"else ""
 
Or you can use a dispalya s formula on the strString field
If currentfieldvalue = "N" then "NOC"else ""



Print Page | Close Window