QUESTION : Reports - Database Fields

Arg81

Well-known member
Joined
Mar 11, 2005
Messages
949
Location
Midlands, UK
Programming Experience
1-3
OK, this is a weird one to me but hopefully someone will tell me the reason why...

In my app, I have fields for 2 Account Managers. This is because a secondary AM can be added at a later date.

Because I need to load the same data for this fields, I've just created 2 dataAdapters - daAM and daSecAM. In my main table, AM and SecAM are integers, and the comboboxes look up the Name from these 2 dataAdapters.

This works fine in my App, and 95% of the time there will never be a secondary AM.

In my report, I have created the table link between my Main Table and my 2 lookuptables - field AM in tableMain -> EmployeeID in tableAM and field secAM -> EmployeeID in tableSecAM.

If there is no secAM for the record, the report comes back blank. If there is a secAM for the record the report loads OK.
I've taken the Name from tableSecAM off my report and dropped SecAM (integer) from tableMain onto the report. - THIS WORKS FINE.

So the problem is with the link to the lookup table if the field from the main table is blank when loaded.

Sorry if this doesn't make much sense, hopefully someone has been in a similar situation and knows the correct procedure...

Regards,
luke
 
OK here's a couple of pics to try and explain it better....

So the first shows the Visual link that I've created in Crystal between the main table and the lookups.

AccountManager & SecAccountManager in the main table are integers, so they link across to EmployeeID.

If secAccountManager in mainTable is null, then with FullName from SecAccountManager table on the report, I don't get any data showing...
 

Attachments

  • Image2.jpg
    Image2.jpg
    12.7 KB · Views: 48
  • Image3.jpg
    Image3.jpg
    12.3 KB · Views: 47
Back
Top