Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Components & Controls > Reporting / Printing

Reporting / Printing Discussion on output-creation components such as reporting, pdf, etc.

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-02-2010, 8:06 AM
Arg81's Avatar
VB.NET Forum Idol
.NET Framework: .NET 2.0
 
Join Date: Mar 2005
Location: Midlands, UK
Age: 28
Posts: 903
Reputation: 258
Arg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shame
Default Crystal Report - Linked table

Good afternoon

I'll try to explain this as best I can.

Have a report that shows main table fields and then "links" to lookup tables
I have 2 fields "Technician A" and "Technician B"
In my DataSet, there are 2 datatables, TechA and TechB (both with EmployeeID, EmployeeName)

Technician A is always going to have a value. B will only be selected for larger projects.

In Database Expert, I have linked TechnicianA to EmployeeID (TechA) and TechnicianB to EmployeeID (TechB)

On the report, I have dragged EmployeeName from both dataTables.

ISSUE
If the project DOES have a value set for EmployeeB, the report loads OK.
If the project DOES'NT have a value set for EmployeeB, the report loads Blank.

If I remove EmployeeName from the report (TechB), the report loads OK.


There's obviously an issue with the link, any ideas? I need the report to load whether or not TechnicianB has a value or not.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-02-2010, 8:28 AM
Arg81's Avatar
VB.NET Forum Idol
.NET Framework: .NET 2.0
 
Join Date: Mar 2005
Location: Midlands, UK
Age: 28
Posts: 903
Reputation: 258
Arg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shame
Default

If I set this to a LeftOuterJoin (right join is greyed out) then the report loads... but it repeats for the number of employees that are in that DataTable, in this case 7 Technicians so it will repeat 7 times....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-02-2010, 1:36 PM
Arg81's Avatar
VB.NET Forum Idol
.NET Framework: .NET 2.0
 
Join Date: Mar 2005
Location: Midlands, UK
Age: 28
Posts: 903
Reputation: 258
Arg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shame
Default

Left Outer Join works perfectly if there is no TechnicianB.
It'll load the report but leave the field blank.

If I try it for a project that has a TechnicianB, that's when it'll repeat for the amount of users in the TechB dataTable......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-03-2010, 11:13 AM
Arg81's Avatar
VB.NET Forum Idol
.NET Framework: .NET 2.0
 
Join Date: Mar 2005
Location: Midlands, UK
Age: 28
Posts: 903
Reputation: 258
Arg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shameArg81 puts e.f. hutton to shame
Default

Now solved...

Left outer join is correct.

The reason for the duplication was due to me linking my CustomerID to the 2 Customer tables I had, both of which had 2x Primary Keys.
Instead I needed to link the main table to my first customer table on CustomerID, then link this to the second customer table on CustomerID.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 7:19 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.