I wrote a basic stored procedure from TableJ, that selects all jobs and I developed a report with Crystal Reports which shows the jobs with missing vessels, missing dates,….. Each job has one vessel, one date, …
1. Some jobs with the field value TableJ.car='F' have one or more containers,
2. some jobs with the field value TableJ.car='F' don’t have containers yet,
3. and some jobs with the field value TableJ.car='L' don’t have containers, they have boxes in the TableJ.
I have the containers in TableC.
TableJ is linked with TableC through the JobNo and I have outer join on TableC. TableC doesn’t have the JobNo until the users input the containers in the system.
So I wrote a CTE that retrieves the count of the containers (the container is type char) for a job from TableC and I have in the report a formula: if the count is 0, print ‘Missing’. But formula doesn’t work; I tried to put a formula in the report: if is null print ‘Missing’. Still doesn’t work. Obviously I miss something.
Could you help, please?