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

String Formula Not Displaying Properly...

Status
Not open for further replies.

jcrawford08

Technical User
Nov 19, 2008
71
US
Hi All,

I'm running CR XIR1; I'm having an issue with some rather complex user fields I'm stringing together into one massive "summary" formula. I can get each of the fields to display data themselves, so something is skewing it in the formula I'm using.

When I place the formula {@Reference Information} into the report, it shows blank - not even showing the plain text spliced into it...

Not sure if it applies but the fields come from separate tables that all had to be left outer joined into the report...

As always, any help is GREATLY appreciated...

stringvar action;
stringvar effdate;
stringvar dob;
stringvar ssn;
stringvar mcrid;
stringvar npinum;
stringvar relation;
stringvar whenownr;
stringvar whenmgr;


if (isnull({USR_UDQUES_56.ANS_TEXT}) then action:="Information Not Entered" else
action:=totext({USR_UDQUES_56.ANS_TEXT});

if isnull({USR_UDQUES_57.ANS_TEXT}) then effdate:="Information Not Entered" else
effdate:=totext({USR_UDQUES_57.ANS_TEXT});

if isnull({USR_UDQUES_52.ANS_TEXT}) then dob:="Information Not Entered" else
dob:=totext({USR_UDQUES_52.ANS_TEXT});

if isnull({USR_UDQUES_51.ANS_TEXT}) then ssn:="Information Not Entered" else
ssn:=totext({USR_UDQUES_51.ANS_TEXT});

if isnull({USR_UDQUES_53.ANS_TEXT}) then mcrid:="Information Not Entered" else
mcrid:=totext({USR_UDQUES_53.ANS_TEXT});

if isnull({USR_UDQUES_54.ANS_TEXT}) then npinum:="Information Not Entered" else
npinum:=totext({USR_UDQUES_54.ANS_TEXT});

if isnull({USR_UDQUES_50.ANS_TEXT})then relation:="Information Not Entered" else
if instr(totext({USR_UDQUES_50.ANS_TEXT}),"Other")=1 and isnull({USR_UDQUES_55.ANS_TEXT}) then relation:="Other Selected and Nothing Specified" else
relation:=totext({USR_UDQUES_50.ANS_TEXT});

if isnull({USR_UDQUES_58.ANS_TEXT}) then whenownr:="Information Not Entered" else
whenownr:=totext({USR_UDQUES_58.ANS_TEXT});

if isnull({USR_UDQUES_59.ANS_TEXT}) then whenmgr:="Information Not Entered" else
whenmgr:=totext({USR_UDQUES_59.ANS_TEXT});

{RV_Practitioner_References.Reference_name}& chr(13)&
"Application is submitted to: "& action & " - Effective: "&effdate & chr(13)&
"DOB: "& dob & chr(13)&
"SSN: "& ssn & chr(13)&
"State Born in: "&{RV_Practitioner_References.Reference_state} & chr(13)&
"Country Born in: " & {RV_Practitioner_References.Reference_country} & chr(13)&
"Medicare Number: "& mcrid & chr(13)&
"NPI Number: " & npinum & chr(13)&
"Relationship to Supplier: " & relation & chr(13)&
"Effective Date became Owner: " & whenownr & chr(13)&
"Effective Date became Manager: " & whenmgr



Thoughts?

Thanks!

Not in word only, but in deed also... 1Jn3:18
 
After some additional testing, I've isolated the problem to be something in the following code; I have the fields set to 'can grow' so that isn't the issue, one caveat is that the field for ssn ({USR_UDQUES_51.ANS_TEXT}) is numeric - all others are text...

stringvar dob;
stringvar ssn;
stringvar mcrid;
stringvar npinum;

if isnull({USR_UDQUES_52.ANS_TEXT}) then dob:="Information Not Entered" else
dob:=totext({USR_UDQUES_52.ANS_TEXT});

if isnull({USR_UDQUES_51.ANS_TEXT}) then ssn:="Information Not Entered" else
ssn:=totext({USR_UDQUES_51.ANS_TEXT});

if isnull({USR_UDQUES_53.ANS_TEXT}) then mcrid:="Information Not Entered" else
mcrid:=totext({USR_UDQUES_53.ANS_TEXT});

if isnull({USR_UDQUES_54.ANS_TEXT}) then npinum:="Information Not Entered" else
npinum:=totext({USR_UDQUES_54.ANS_TEXT});

'DOB: '& dob & chr(13)&
'SSN: '& ssn & chr(13)&
'State Born in: '&{RV_Practitioner_References.Reference_state} & chr(13)&
'Country Born in: ' & {RV_Practitioner_References.Reference_country} & chr(13)&
'Medicare Number: '& mcrid & chr(13)&
'NPI Number: ' & npinum & chr(13)


the only minor change while troubleshooting is I switched it to single quotes (which had no effect, but was worth a shot anyway), but no structural changes otherwise...

again, let me know any thoughts/input you may have....


Thanks!

Not in word only, but in deed also... 1Jn3:18
 
jcrawford,

Your formula is rather complex for me to replicate to troubleshoot, but wondering if you need to assign your output to a string, then place the string at the bottom of your field?

For example, add the following lines (in red) into your existing formula:
Code:
stringvar dob;
stringvar ssn;
stringvar mcrid;
stringvar npinum;
[red]StringVar FinalText;[/red]

if isnull({USR_UDQUES_52.ANS_TEXT}) then dob:="Information Not Entered" else
dob:=totext({USR_UDQUES_52.ANS_TEXT});

if isnull({USR_UDQUES_51.ANS_TEXT}) then ssn:="Information Not Entered" else
ssn:=totext({USR_UDQUES_51.ANS_TEXT});

if isnull({USR_UDQUES_53.ANS_TEXT}) then mcrid:="Information Not Entered" else
mcrid:=totext({USR_UDQUES_53.ANS_TEXT});

if isnull({USR_UDQUES_54.ANS_TEXT}) then npinum:="Information Not Entered" else
npinum:=totext({USR_UDQUES_54.ANS_TEXT});

[red]FinalText:=[/red]'DOB: '& dob & chr(13)& 'SSN: '& ssn & chr(13)& 'State Born in: '&{RV_Practitioner_References.Reference_state} & chr(13)&'Country Born in: ' & {RV_Practitioner_References.Reference_country} & chr(13)&'Medicare Number: '& mcrid & chr(13)&'NPI Number: ' & npinum & chr(13);

[red]FinalText;[/red]

Hope this helps! Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Thanks Mike,

Unfortunately I tried that while trouble shooting earlier and it was a no-go....

I now have it narrowed down to the two lines of code that have NOTHING to do with the variables... it appears they are the culprits, but I'm not sure why... I don't have control for nulls on the fields, but the field data is within the record and I can display the data by itself just fine... Here are the two lines in the display section of the formula that are giving me greif - I tested and the presence of either line independently crashes the formula and I am left with nothing displaying...

'State Born in: '&{RV_Practitioner_References.Reference_state} & chr(13)&
'Country Born in: ' & {RV_Practitioner_References.Reference_country}


BREAKTHROUGH:

AND THE PROBLEM IS .... dum dum dummmm...... a table linking error - I had the table these two fields were pulling from as a default inner join - changed to outer join and the formula worked perfectly.... blond moment...



Not in word only, but in deed also... 1Jn3:18
 
jcrawford,

Glad you found the culprit! [smile]

Cheers!


PS: Darn "Friday" Moments [wink] ... gotten me a few times today already too. Have a great one.

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top