I have 3 specific columns I am calling in a SQL Query that will be merged into one string in Crystal Reports and they have to be a total length (between the 3) = 75 characters.
My specific coding on these 3 fields in SQL looks like:
My issue:
I had a [Primary Payer] = 'Zales' and a [Secondary Payer] = 'Aetna Life and Casualty' and a [Third Payer] = 'United Health Care SLCit'.
Is it possible to take the LEFT 25 characters and if not equal to a total of 25 characters pad it with blank spaces in crystal?
My current Formula's are such:
My specific coding on these 3 fields in SQL looks like:
Code:
ISNULL(LEFT(ic.ListName, 25), 'xxxxxxxxxxxxxxxxxxxxxxxxx') AS [Primary Payer] ,
ISNULL(LEFT(ic2.ListName, 25), 'xxxxxxxxxxxxxxxxxxxxxxxxx') AS [Secondary Payer] ,
ISNULL(LEFT(ic3.ListName, 25), 'xxxxxxxxxxxxxxxxxxxxxxxxx') AS [Third Payer]
My issue:
I had a [Primary Payer] = 'Zales' and a [Secondary Payer] = 'Aetna Life and Casualty' and a [Third Payer] = 'United Health Care SLCit'.
Is it possible to take the LEFT 25 characters and if not equal to a total of 25 characters pad it with blank spaces in crystal?
My current Formula's are such:
Code:
if {Data.Primary Payer}= 'xxxxxxxxxxxxxxxxxxxxxxxxx' then ' '
else {Data.Primary Payer}
Code:
if {Data.Secondary Payer}= 'xxxxxxxxxxxxxxxxxxxxxxxxx' then ' '
else {Data.Secondary Payer}
Code:
if {Data.Third Payer} = 'xxxxxxxxxxxxxxxxxxxxxxxxx' then ' '
else {Data.Third Payer}