Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports
Viewing all articles
Browse latest Browse all 4814

how to display record name & spouse name when spouse not deceased. Otherwise, show record name only.

$
0
0

I'm trying to display spouse names along with the record name (all in one table).  However, if spouse is deceased, I want to display only record name.  It works fine except that if spouse name field is blank, then nothing shows up.

 

// ***********  Caputre spouse names ****************

Stringvar spouseName;

if not isnull({YMRE_Constituent.SpouseName}) THEN

    spouseName := {YMRE_Constituent.SpouseName}

else

     spouseName := "";

 

// **************** Capture Deceased spouse value

stringVar spDesceasedYN;

if {YMRE_Constituent.SpouseDeceased} IN ["Y", "N"] THEN

    spDesceasedYN := {YMRE_Constituent.SpouseDeceased}

else

    spDesceasedYN :="";

 

 

//***** if spouse deceased, show primary name only. otherwise, show  both couples.*******

if  spDesceasedYN = "N" THEN

    {YMRE_Constituent.Fullname} + chr(10) + spouseName

else

     {YMRE_Constituent.Fullname}

 

 

Thanks ahead of time for helping.


Viewing all articles
Browse latest Browse all 4814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>