teferi2002
Technical User
Hi everybody;
I am encountering a problem trying to sort a report using different fields. I have a string parameter and based on the customers’ selection the sort field will be assigned. The problem is one of the fields that I am trying to assign to the sort field is a Number field. The formula is giving me an error message because the rest of the fields are text fields. When I changed the number field to text, it doesn’t sort it right. Is there am easier way to do this.
Here is the formula field that I am trying to assign
case 'PERMITNUMBER' : cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})
select uppercase({?sortfield})
case 'SUBAREA' : {WMS_MBP_PERMITS.SUBAREA}+{WMS_MBP_CONTROL_SECTIONS.TRUNK_HIGHWAY}+mp+cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})+{WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}
case 'CONTROLSECTION' : {WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}+{WMS_MBP_CONTROL_SECTIONS.TRUNK_HIGHWAY}+mp+cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})+{WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}
case 'BEGREFPOINT' : {WMS_MBP_PERMITS.MILE_POINT_BEGIN}
case 'ENDREFPOINT' : {WMS_MBP_PERMITS.MILE_POINT_END}
case 'PERMITNUMBER' : cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})
default: {WMS_MBP_CONTROL_SECTIONS.TRUNK_HIGHWAY}+mp+cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})+{WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}
I am encountering a problem trying to sort a report using different fields. I have a string parameter and based on the customers’ selection the sort field will be assigned. The problem is one of the fields that I am trying to assign to the sort field is a Number field. The formula is giving me an error message because the rest of the fields are text fields. When I changed the number field to text, it doesn’t sort it right. Is there am easier way to do this.
Here is the formula field that I am trying to assign
case 'PERMITNUMBER' : cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})
select uppercase({?sortfield})
case 'SUBAREA' : {WMS_MBP_PERMITS.SUBAREA}+{WMS_MBP_CONTROL_SECTIONS.TRUNK_HIGHWAY}+mp+cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})+{WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}
case 'CONTROLSECTION' : {WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}+{WMS_MBP_CONTROL_SECTIONS.TRUNK_HIGHWAY}+mp+cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})+{WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}
case 'BEGREFPOINT' : {WMS_MBP_PERMITS.MILE_POINT_BEGIN}
case 'ENDREFPOINT' : {WMS_MBP_PERMITS.MILE_POINT_END}
case 'PERMITNUMBER' : cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})
default: {WMS_MBP_CONTROL_SECTIONS.TRUNK_HIGHWAY}+mp+cstr({WMS_MBP_PERMITS.PERMIT_NUMBER})+{WMS_MBP_CONTROL_SECTIONS.CONTROL_SECTION}