Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED
 Login/Join
 
Gold member
posted
Hello, I have the following code in my report.

SET ASNAMES = ON
SET HOLDLIST=PRINTONLY

DEFINE FILE VUSER_ROUTING_CODES_AND_LIMITS
NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT)
END

TABLE FILE VUSER_ROUTING_CODES_AND_LIMITS
PRINT
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.TO_USER AS 'USER'
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP NOPRINT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT NOPRINT
ON TABLE HOLD AS LIMIT FORMAT FOCUS
END

TABLE FILE LIMIT
SUM MAX.JOB_GROUP AS 'JOB_GROUP'
USER
COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'
BY JOB_GROUP NOPRINT
END  


When I run this code I get the following error:


(FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

If I comment the line

COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'

I don't get any errors. I need that line so that I can insert the > sign in front of the dollar limit.

What am I doing wrong.

Also the reason I have the DEFINE field 'NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT) so that the sorting are based on dollar amount low to high. Without it the sorting was not working.

Please help.

This message has been edited. Last edited by: kpiracha,


WebFOCUS 7.6.9
Windows 2003
HTML, Plain Text
 
Posts: 96 | Registered: March 15, 2010Reply With QuoteReport This Post
<JG>
posted
quote:
What am I doing wrong.

Everything.

You can not use a numeric field in a concaternation. Simple rule Alpha only.

Your issue is the sort order.

Your solution

Concaternate the alpha columns

Sort on the numeric column using the NOPRINT option.
 
Reply With QuoteReport This Post
Silver Member
posted Hide Post
quote:
Originally posted by kpiracha:
Hello, I have the following code in my report.

SET ASNAMES = ON
SET HOLDLIST=PRINTONLY

DEFINE FILE VUSER_ROUTING_CODES_AND_LIMITS
NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT)
END

TABLE FILE VUSER_ROUTING_CODES_AND_LIMITS
PRINT
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.TO_USER AS 'USER'
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP NOPRINT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT NOPRINT
ON TABLE HOLD AS LIMIT FORMAT FOCUS
END

TABLE FILE LIMIT
SUM MAX.JOB_GROUP AS 'JOB_GROUP'
USER
COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'
BY JOB_GROUP NOPRINT
END  


When I run this code I get the following error:


(FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

If I comment the line

COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'

I don't get any errors. I need that line so that I can insert the > sign in front of the dollar limit.

What am I doing wrong.

Also the reason I have the DEFINE field 'NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT) so that the sorting are based on dollar amount low to high. Without it the sorting was not working.

Please help.


 DEFINE FILE CAR
NCOST/A17 = FTOA(RETAIL_COST,'(D7)','A17') ;
ALPHA_COST/A20 = '> ' || NCOST ;
END
TABLE FILE CAR
SUM ALPHA_COST AS 'RETAIL,COST'
    MODEL
BY HIGHEST RETAIL_COST NOPRINT
END 


7.7.04
Win2K3, Unix
Oracle 10G,SQL2K,XFOCUS,ESRI,BID,MRE,SELF-SERVICCE
 
Posts: 36 | Location: Melville,NY | Registered: August 09, 2004Reply With QuoteReport This Post
<JG>
posted
I thought that's what I just said.

quote:

There is really only one way to learn how to do something and that is to do it.

quote:
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 
Reply With QuoteReport This Post
Expert
posted Hide Post
kpiracha, as shown above, this is normal operation of WebFOCUS. strings can only be concatenated to strings. Numerics can only be used with numerics. all other caes need a conversion.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6275 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
Everyone was right on the money. You guys have done it again. Thanks for all your help.


WebFOCUS 7.6.9
Windows 2003
HTML, Plain Text
 
Posts: 96 | Registered: March 15, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.