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

Removing detail lines where variable > 0 if variable2date > 01/01/2000 1

Status
Not open for further replies.

willz99ta

IS-IT--Management
Sep 15, 2004
132
US
Hi and thanks for your help,

I am trying to build a Crystal Report that doesn't show duplicate lines when I do a pull.

This is actually pretty hard to explain, so I will list the conditions when I want to see what.



Show Detail Line 1 and NOT Detail Line 2 in this instance:
----------------------------------------------------------
Detail Line 1
Name=Zulu PO_Revision=0 Issue_Date > 01/01/2000

Detail Line 2
Name=Zulu PO_Revision=1 Issue_Date = Doesn't Matter



Show Detail Line 2 and NOT Detail Line 1 in this instance:
----------------------------------------------------------
Detail Line 1
Name=Zulu PO_Revision=0 Issue_Date <= 01/01/2000

Detail Line 2
Name=Zulu PO_Revision=1 Issue_Date > 01/01/2000


Thanks for your help,
Will the Confused
 
Let's assume that detail lines 1 and 2 belong to a group based on some ID field {table.ID}. First create a formula {@rev0date}:

if {table.revisionno} = 0 then
{table.issuedate}

Then go to report->selection formula->GROUP and enter:

(
{table.revisionno} = 0 and
maximum({@rev0date},{table.ID}) > date(2000,1,1)
) or
(
{table.revisionno} = 1 and
{table.issuedate} > date(2000,1,1) and
maximum({@rev0date},{table.ID}) <= date(2000,1,1)
)

-LB
 
Wowsa! You are the Caesar of Crystal LBass! That worked perfectly ... now to study it and find out why...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top