views:

139

answers:

2

I'm trying to show employees at a company grouped by worked and still working (in vs2005 crystal reports). The user can pass by parameter a list of companies they want to show.

Tables: VRP-COMPANY, VRP-COMPANY-OPPORTUNITY, VRP-OPPORTUNITY-PRODUCT

The record selection formula: {VRP-COMPANY.COMPANY company} in {?companies}

Grouping is done on: VRP-COMPANY.COMPANY company, then formula to decide its working or worked and then on productname.

Now when I run the report I only get to see the companies who have got entries in the VRP-COMPANY-OPPORTUNITY. I want to see the company name (group) even if there are no entries in the opportunity table. How to do this in Crystal Reports? I tried Left join between company and company-opportunity tabel but no effect.

A: 

I found the problem. Left join was correct but I had an additional select formula (on opportunity status to be closed-won. Therefore it let out the record. The record can also be null when there are no opportunities.

Should the question be deleted?

PoweRoy
No, just mark this as the answer :)
CodeByMoonlight
A: 

I see that the selection formula is still not correct. Probably doing something wrong.

If I use this formula:

{VRP_COMPANY.COMPANY company} in {?companies}

it works

if I use this formula:

(IsNull({VRP-Company-opportunity.opportunity status})
or
({VRP_Company_opportunity.opportunity status} = "Closed - Won"))
and
{VRP_COMPANY.COMPANY company} in {?companies}

it wont work

What I want is all the opportunities shown with status Closed-Won. Not all statusses. I tried something different now. Used the first selection formula and used:

{VRP_Company_opportunity.opportunity status} = "Closed - Won"

To suppress the details section. The problem arising now that a count of the records is going wrong. (4 are being suppressed, and the count still shows 4 instead of 0)

PoweRoy