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

Formula Field does not show up in group expert

Status
Not open for further replies.

FunkyBunch

Instructor
Sep 11, 2007
35
CA
I want to filter the report by the change type associated. If the equipment is archived it is deleted, if the equipment is brand new it is added, if the equipment has been associated within the company before, it is transferred.

Here is the formula i have:
Stringvar MEChanger;

if (not isnull({USER_DEFINED20_FW.DATE_MOUNTED_EQUIPMENT_REMOVED_FW}) and
not isnull({USER_DEFINED20_FW.DATE_MOUNTED_EQUIPMENT_Added_FW}) and
{user_Defined20_fw.access_equip_Fw} = NExt({user_Defined20_Fw.access_Equip_fw}))
or
(isnull({USER_DEFINED20_FW.DATE_MOUNTED_EQUIPMENT_REMOVED_FW}) and
not isnull({USER_DEFINED20_FW.DATE_MOUNTED_EQUIPMENT_Added_FW}) and
{user_Defined20_fw.access_equip_Fw} = Previous({user_Defined20_Fw.access_Equip_fw}))then

MEChanger := 'Transfer'

else if {user_defined20_fw.archive_status_fw} = 'A' then

MEChanger := 'Deletion'

else
MEChanger := 'Addition'


I am using Crystal 9. Why could i not group by this field?

thanks for all of your help!
 
You have posted this thread in the wrong forum - but the reason you cannot group on this field is that the formula is looking at Previous records meaning the records would have to be grouped already.

Take the Next and Previous functions out of the formula and then you can group.......looks like a stored procedure is required here.

I hope this helps you

paulmarr
 
How would i go about implementing a stored procedure in this case? I cannot run the report from an SQL command as the application i am uploading this report to does not handle reports ran from the SQL command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top