Joined: 25 Aug 2014
Location: United States
Online Status: Offline
Posts: 11
Posted: 26 Aug 2014 at 5:31am
I'm using the following formula to search and return a Yes if there is a matching property code and a No if there is not. I only want property codes that have multiple records but it is saying yes for some that do not have multiples what am I doing wrong:
if
(
(
({txre_master.a_property_code} = next({txre_master.a_property_code}))
or
({txre_master.a_property_code} = previous({txre_master.a_property_code}) )
Joined: 22 May 2009
Online Status: Offline
Posts: 347
Posted: 26 Aug 2014 at 6:16am
Well, I know some of that grouping could be removed. Not sure if that is what is causing the issue or not though:
if ({txre_master.a_property_code} = next({txre_master.a_property_code}) or
{txre_master.a_property_code} = previous({txre_master.a_property_code}))
then 'Yes'
else 'No'
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 02 Sep 2014 at 5:11am
I can see 2 different approaches that may help.
First, we can start with the 'easiest' in my eyes, and probably the hardest for the OP...a stored procedure would alleviate all these issues as you can filter and compare and be done with everything in the proc.
With that suggestion out of the way, the other solution that I would try would be to add a second copy of the txre_master table to the report. Join the 2 copies by a_property_code.
Then you can filter the records by table1 having a year of 2013 and table2 having a year of 2014. Now all of your data is in one row, and the report should be much simpler. You can group by a formula as NEXT and PREVIOUS are no longer an issue.
By the way, table1 and table2 are basically arbitrary designations for the 2 copies of the txre_master table.
As a note: Crystal is happiest(I believe) or maybe I should say is simplest when all the data is in one row.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum