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

Parameter fields and record selection

Status
Not open for further replies.

streetj

IS-IT--Management
Sep 25, 2002
2
GB
Hi

I am Trying to write a report in Crystal Reports 9.0. I have four parameter fields:

Matter Number (User enters a number)
Start Date (Select Start Date)
End Date (Select End Date)
Time (Choose from a pick list which passes the Value 1, 2 or 3)

I have managed to sort out the report so it selects the Matter number and timecards between the two dates using the following query in record selection.

{?Matter Number} = {matter.mmatter} and
{timecard.tworkdt} >= {?Start Date} and
{timecard.tworkdt} <= {?End Date}

My problem is that I need to add in the Time parameter with the following results

1 = Display all timecards
2 = Display timecards if {timecard.tinvoice} is not null
3 = Display timecards if {timecard.tinvoice} is null

So far my record selction looks like this and it works as long as I select time = 3:

{?Matter Number} = {matter.mmatter} and
{timecard.tworkdt} >= {?Start Date} and
{timecard.tworkdt} <= {?End Date} and
if {?Time} = 3 then (isnull ({timecard.tinvoice}))

But I am now stuck I tried the folowing

{?Matter Number} = {matter.mmatter} and
{timecard.tworkdt} >= {?Start Date} and
{timecard.tworkdt} <= {?End Date} and
if {?Time} = 3 then (isnull ({timecard.tinvoice})) else
if {?Time} = 2 then (isnull (not ({timecard.tinvoice})))

But I kept getting a message saying a Boolean is required here.

Any help would be really appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top