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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula Change

Status
Not open for further replies.

ggies07

Technical User
Jun 27, 2013
40
US
Hello,

I need to change a formula in a report I did not create. Here is the code. I need to delete and insert the status date the child enter the school after the bolded part. So an example would be Child's name - status date.

Thanks!

]WhilePrintingRecords;

StringVar Student1;
StringVar Student2;
StringVar Student3;
StringVar Student4;
StringVar Student5;
NumberVar Sibling;

If NumberVar Sibling = 1 then Student1 := {StsSt.StsSt_Nickname} + " (" + IF {StsStHrT.StsStHrT_Lastname} = "Centeno" then Left ({StsStHrT.StsStHrT_Nickname},1 ) + ". " + {StsStHrT.StsStHrT_Lastname} + ")" else
if {StsStHrT.StsStHrT_Lastname} = "Meese" then "Meese/Gonzales" + ")" else
if {StsStHrT.StsStHrT_Lastname} = "School" then "Middle School" + ")"
else {StsStHrT.StsStHrT_Lastname} + ")" else
If NumberVar Sibling = 2 then Student2 := {StsSt.StsSt_Nickname} + " (" + IF {StsStHrT.StsStHrT_Lastname} = "Centeno" then Left ({StsStHrT.StsStHrT_Nickname},1 ) + ". " + {StsStHrT.StsStHrT_Lastname} + ")" else
if {StsStHrT.StsStHrT_Lastname} = "Meese" then "Meese/Gonzales" + ")" else
if {StsStHrT.StsStHrT_Lastname} = "School" then "Middle School" + ")"
else {StsStHrT.StsStHrT_Lastname} + ")" else
If NumberVar Sibling = 3 then Student3 := {StsSt.StsSt_Nickname} + " (" + IF {StsStHrT.StsStHrT_Lastname} = "Centeno" then Left ({StsStHrT.StsStHrT_Nickname},1 ) + ". " + {StsStHrT.StsStHrT_Lastname} + ")" else
if {StsStHrT.StsStHrT_Lastname} = "Meese" then "Meese/Gonzales" + ")" else
if {StsStHrT.StsStHrT_Lastname} = "School" then "Middle School" + ")"
else {StsStHrT.StsStHrT_Lastname}+ ")" else
If NumberVar Sibling = 4 then Student4 := {StsSt.StsSt_Nickname} + " (" + IF {StsStHrT.StsStHrT_Lastname} = "Centeno" then Left ({StsStHrT.StsStHrT_Nickname},1 ) + ". " + {StsStHrT.StsStHrT_Lastname} + ")" else
if {StsStHrT.StsStHrT_Lastname} = "Meese" then "Meese/Gonzales" + ")" else
if {StsStHrT.StsStHrT_Lastname} = "School" then "Middle School" + ")"
else {StsStHrT.StsStHrT_Lastname} + ")" else
If NumberVar Sibling = 5 then Student5 := {StsSt.StsSt_Nickname} + " (" + IF {StsStHrT.StsStHrT_Lastname} = "Centeno" then Left ({StsStHrT.StsStHrT_Nickname},1 ) + ". " + {StsStHrT.StsStHrT_Lastname} + ")" else
if {StsStHrT.StsStHrT_Lastname} = "Meese" then "Meese/Gonzales" + ")" else
if {StsStHrT.StsStHrT_Lastname} = "School" then "Middle School" + ")"
else {StsStHrT.StsStHrT_Lastname} + ")
 
You would add something like this:

ToText({Status Date Field}, "MM/dd/yyyy")

You can look at the Crystal Help for ToText to get to more information about formatting strings to get the date into the format you need.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Thanks Dell. After posting this and playing around, I figured out how to do that. much appreciated though. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top