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

error message: The formula result must be a boolean

Status
Not open for further replies.

112055

Programmer
May 13, 2002
61
US
I tried several ways or places to add a Field under the Report Fields. Right now under the Report Fields: ( I have ...)
GetActiveAgentsRptData;1.FINANCIAL_INDICATOR
GetActiveAgentsRptData;1.NAME
GetActiveAgentsRptData;1.LAST_LOGON
GetActiveAgentsRptData;1.CREATED_DATE
GetActiveAgentsRptData;1.USER_NAME
GetActiveAgentsRptData;1.DEALER_ID
GetActiveAgentsRptData;1.ENABLED_FLAG
GetActiveAgentsRptData;1.USER_ID

Here I tried to put in GetActiveAgentsRptData;1.ACCOUNT_ENABLED
But I got an error message saying ...'The formula result must be a boolean'

@AgentDescription
@AgentID
@AgentName
@AgentType
@DisplayUserID
@UserName

I tired to go under REPORT --> EDIT SELECTION FORMULA --> RECORD or GROUP,
put in {GetActiveAgentsRptData;1.ACCOUNT_ENABLED}..everytime I hit 'CHECK' ,I get the above mentioned error.

This is a report calling a simple select statement from a stored procedure with no parameters to pass.
An earlier report was created with the same SQL Query inside the Crystal Report, it pulls the data out no problem.
The revamped Report with the same SQL Query but is put into a separate Stored Procedure. This time it gives me more data than the original report. Funny thing, the original report have this {GetActiveAgentsRptData;1.ACCOUNT_ENABLED} under the Report Fields. Why is it that I cannot do the same in this later report. This is a simple report, don't know where I screw up, please help...

Thanks a lot...







 
A record or group selection formula must be a boolean, or in other workd must evaluate to true or false. Your formula does not do this. You would need to compare the field name with some value so that a true/false evaluation can occur.

Also, lets take a step back and determine what it is you are trying to accomplish with this formula. If you are not trying to restrict the records/groups on the report, you in the wrong place.

Please let me know if I can help. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
This:

{GetActiveAgentsRptData;1.ACCOUNT_ENABLED}

sounds like it was a boolean and used as part of the record selection criteria.

You should just have it in the Stored Procedure as well (as part of the Where clause), otherwise the SP will return rows that Crystal later has to filter out.

-k kai@informeddatadecisions.com
 
Thanks for the quick response everyone...
I do have the ACCOUNT_ENABLED included in the select statement inside the Stored Procedure.....
SELECT
DEALER_OR_FINANCIAL_INSTITUTIO.DEALER_ID,
DEALER_OR_FINANCIAL_INSTITUTIO.FINANCIAL_INDICATOR,
DEALER_OR_FINANCIAL_INSTITUTIO.NAME,
DEALER_OR_FINANCIAL_INSTITUTIO.ENABLED_FLAG,
DEALER_OR_FINANCIAL_INSTITUTIO.CREATED_DATE,
PERSONNEL.USER_ID,
PERSONNEL.USER_NAME,
PERSONNEL.ACCOUNT_ENABLED,
PERSONNEL.LAST_LOGON
FROM
{ oj (DEALER_OR_FINANCIAL_INSTITUTIO INNER JOIN USER_AUTHORITY ON
DEALER_OR_FINANCIAL_INSTITUTIO.DEALER_ID = USER_AUTHORITY.DEALER_ID)
RIGHT OUTER JOIN PERSONNEL ON
USER_AUTHORITY.USER_ID = PERSONNEL.USER_ID}

I understand a record or group selection formula must be a boolean, so put me on the right track, start me as a newbie, what do I have to do to achieve this?
I go to Report--> Select Expert--> New--> pick ACCOUNT_ENABLED, then put in this...( isnull({GetActiveAgentsRptData;1.ENABLED_FLAG}) or uppercase({GetActiveAgentsRptData;1.ENABLED_FLAG})="Y") --> hit Ok to close out. Then I go back out to Report-->Edit Selection Formula-->Group/Report to put in {GetActiveAgentsRptData;1.ACCOUNT_ENABLED}--> hit 'CHECK' ,the same error message appear,'The formula result must be a boolean'...
I have clicked and re-clicked all the buttons and tools to see if there is anything else I need to include in or change, but of no luck...
 
Why are you doing both a record selection formula and a group selection formula? Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Hi dgillz,
I figured it out now, in this ,
( isnull({GetActiveAgentsRptData;1.ENABLED_FLAG}) or
uppercase({GetActiveAgentsRptData;1.ENABLED_FLAG})="Y")...I forgot to change ENABLED_FLAG to ACCOUNT_ENABLED...

It was group.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top