Formula not available in Select Expert

PeterOC

Registered User.
Local time
Today, 16:46
Joined
Nov 22, 2007
Messages
80
Hi all,

I’m struggling with an aspect of crystal reports and was wondering if anyone can help?

I have a report which assesses jobs completed on the same day that they were started. It does this with a formula at detail level. The formula is ‘SameDayComp’:

Local DateVar array start := MakeArray(DATE({JOB_DET.JOBDATE}));
Local DateVar comp := Date({JOBS.JOBCOMPDATE});
Local numberVar stat := 0;

local numberVar Y :=UBound (start);
For Y := UBound (start) To 1 Step -1 Do
(
if start[Y]= comp then stat := 1
);
stat


The report is grouped on job number and in the group footer I have the formula ‘SameDayComp2’:

if Count ({@SameDayComp}, {JOBS.JOBNO})=Sum ({@SameDayComp}, {JOBS.JOBNO}) then 1 else 0

I need to filter the report by SameDayComp2 but the formula isn’t available for selection in the selection criteria. I've tried changing SameDayComp2 from a formula to a Running Total but this hasn't worked. Do you know of a way I can get around this?

Regards,

Peter
(Crystal Reports v.10)
 
I think the problem with this is that I'm trying to use a group level formula in the selection criteria. I don't think you can do this in crystal but if anyone know's different I'd like to hear about it.

Thanks,
Peter
 

Users who are viewing this thread

Back
Top Bottom