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

Parameters + Count??

Status
Not open for further replies.

vshapiro

Programmer
Jan 2, 2003
211
US
I have a table with following fields:

Proj# DraftDate FinalDate ExitDate ....and much more
111 1/1/01 5/5/01 null
222 2/2/02
333 5/5/03 6/5/03
444 1/1/02 ...etc

I need to have a report where I select Proj# where DraftDate is not null or Final Date is not null... and display the Date which user will select. For example:

Proj# DraftDate or

Proj# FinalDate

Date should be a parameter.

But I cannot display Proj# where Date is not null...??
 
Please at least post your Crystal version when requesting help.

A bit of a language barrier I fear. Your statements conflict, your state that you want a project where one date is not null OR another date is not null, and then later you state that date must be a parameter...

I'll ignore the majority of your post and simple offer the solution.

Creata a Project and the date parameter.

Use Report->Edit Selection Formula->Record:

(
{table.DraftDate} = {?MyDateParameter}
or
{table.FinalDate} = {?MyDateParameter}
)
and
(
{table.project} = {?MyPrjoectParameter}
)

Hopefully this will get you close. If not try less text and supply technical inforamtion, example data and expected output, text descriptions are never as helpful.

-k
 
Thank you. I'll try another explanation.
I am using Crystal 9.0.
I need to be able to show project numbers only if DraftDate not null and count them. If I have all together 9000 Project# and DraftDate field has only 2000 date (other is just null), I want to shoew only these 2000 Project# and My count should show only 2000. Instead, it is counting for me all 9000 and if I do DistinctCount it show 2001(because it count one null). How can I do this properly??

Thank you
 
Create a formula (@Date_OK):
-------------------------------------
IF IsNull({DraftDate}) THEN 0 ELSE 1
-------------------------------------

SUM that formula to get your count.

Cheers,
- Ido


CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I think that Ido nailed it, another option would be to use a Running total and place the criteria in there.

Still I'm uncertain what you want as your determined to describe data rather than show examples.

Please provide examples if you need further help.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top