Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: fourmula asking for Then already have Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 26 Aug 2014 at 4:05am
In the detail line where you don't want the information to show:

(
{txre_master.a_property_code} = next({txre_master.a_property_code})
or
{txre_master.a_property_code} = previous({txre_master.a_property_code})
)

and

(
{txre_master.a_juris_code}= next({txre_master.a_juris_code})
or
{txre_master.a_juris_code} = previous({txre_master.a_juris_code})
)
|< /\ '][' ( )
IP IP Logged
tsh1586
Newbie
Newbie


Joined: 25 Aug 2014
Location: United States
Online Status: Offline
Posts: 11
Quote tsh1586 Replybullet 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}) )

)
)
then 'Yes'
else 'No'
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet 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'
|< /\ '][' ( )
IP IP Logged
z9962
Senior Member
Senior Member
Avatar

Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
Quote z9962 Replybullet Posted: 27 Aug 2014 at 12:45am
Can you group on {txre_master.a_property_code}
then apply a group filter where count of this field < 2
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet 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.

HTH
IP IP Logged
<< Prev  Page  of 2
Printable version Printable version

Forum Jump
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