Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incorrect data when linking tables

Status
Not open for further replies.

bboy27

Technical User
Nov 1, 2004
4
0
0
US
I am using Crystal Reports v9 and I am trying to create a report of Actual Hrs vs Budgeted Hrs.
One table has the project, task and actual hrs and the other table has the same project, task but with budgeted hrs.
When I link the tables I am getting incorrect values that I don't understand where they are coming from.
I am linking the two tables on project and task and displaying in a cross tab showing the project as task and summarizing on both the actual and budgeted hrs.

Any suggestions on how to solve this problem?

TIA
 
The join is what's getting you, try a Union approach in a Command Object:

The sql might be something like:

select 'Actual' datasource, field1, field2, etc... from table1
union all
select 'Budgeted' datasource, field1, field2, etc... from table2

Now you'll have a single data source to work with.

-k

 
Thanks for the fast reply!

I have managed to get the union to work but is there a way to keep the two values Budget vs. Actual hrs separate? Because what is happening with the union is that it is combining the actual hrs and budgeted together.
Is there anyway to keep them separate?

TIA
 
If you followed my approach, then they are differentiated by the hardcoded "datasource" column which identifies each.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top