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

A string is required here Error in Formula 1

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
US
I am getting an error "A string is required here" and its highlighting "IF {Data.GroupFlag} = "FinancialClass" THEN {Data.FinancialClass}"

Any assistance is appreciated.

Code:
IF {Data.GroupFlag} = "Doctor" THEN
    {Data.Doctor}
ELSE IF {Data.GroupFlag} = "Resource" THEN
    {Data.Resource}
ELSE IF {Data.GroupFlag} = "Department" THEN
    {Data.Department}
ELSE IF {Data.GroupFlag} = "FinancialClass" THEN
    {Data.FinancialClass}
 
cyreports,

What is the Data Type of {Data.FinancialClass}? I would assume all other fields which can be returned (Doctor, Resource, Department) are all strings, and therefore FinancialClass has to be a string as well.

One option (if it works for the report), is to add the following to your last IF clause:

ELSE IF {Data.GroupFlag} = "FinancialClass" THEN
ToText({Data.FinancialClass})

Hope this helps,

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