on 12-25-2014 9:20 AM
I have some issues in groping my records.My grouping is based on four tables respectively, namely Project,Pay_Item,Sub_Pay_Item and Project_Work_Item. Project_Work_Item holds a Project and items from Work_Item and Sub_Pay_item used for a project.
Here's the format:
-Project A------[based on project id] -Project B------[based on project id]
-1200------[based on pay item] -1400------[based on pay item]
-12.01------[based on sub pay item] -14.01------[based on sub pay item]
-12.01-(a)------[based on work item in Project Work Item] -14.01-(a)-------[based on work item in Project Work Item]
I Joined the tables using right join and i get results for the work items. I also wanted to view the result for the sub pay item since it can be used for a project.
Here's the format i want together with the work items
-Project A------[based on project id]
-1200------[based on pay item]
-12.01------[based on sub pay item]
-sometimes there may not be a work item here
since pay item can be used directly.
Hi,
From your example, it's visible that you have records with sub pay item values without pay item and work item details.
Check by creating a sample report with just pay item and sub pay item tables with an outer join on pay item column, so that you can confirm whether there are any sub pay items without having pay item detail.
Also, there is no join between Pay Item and Sub Pay Item tables in the screenshot you have shared. Isn't that required?
Thanks,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Any thoughts on that?
Hi,
If you have Pay Item Details for each Sub Pay Item, then those should be displayed as second group as per your grouping irrespective of whether you have Work Item value. But those are not displayed, so there might be a problem with joins you have created between tables.
As for as your error message concerned, that happens when you have tables with circular links. That is, Table A, Table B and Table C are joined based on same column.
Check these links for more info:
Thanks,
Raghavendra
Project id | project name | overhead | profit margin |
---|---|---|---|
po1 | sample project | 10 | 15 |
pay item | description |
---|---|
1400 | Office, Laboratory, Accommodation |
6400 | Bituminous Road Bases and Surfacing |
8100 | Foundations for Structures |
9400 | Road Signs |
pay item | sub pay item | description | unit |
---|---|---|---|
1400 | 14.03 | Items measured and paid for by lump sum | |
1400 | 14.04 | Services | |
1400 | 14.05 | Vehicle for Engineer and his staff | |
6400 | 64.05 | Base layer construction | |
8100 | 81.01 | Site Investigations | Lsum |
8100 | 81.32 | Cast in situ concrete | m3 |
8100 | 81.05 | Back fill to excavations |
pay item | sub pay item | work item | description | unit |
---|---|---|---|---|
1400 | 14.03 | 14.03( i ) | Office equipment | Lsum |
1400 | 14.04 | 14.04 (a) | Fixed Costs | Lsum |
1400 | 14.05 | 14.05 (a) | Vehicle Type A | no. |
6400 | 64.05 | 64.05 (a) | 60/70 penetration grade bitumen | ton |
8100 | 81.05 | 81.05 (b) | Imported material | m3 |
project id | work item |
---|---|
p01 | 14.03( i ) |
p01 | 14.04 (a) |
p01 | 14.05 (a) |
p01 | 64.05 (a) |
p01 | 81.01 |
p01 | 81.32 |
p01 | 81.05 (b) |
I don't know how to share the report with a saved data. How can i attach?
Hi Raghavendra,
Items are used from two tables for a project. I think you haven't noticed that items 81.01 and 81.02 from sub pay item table were used for the project.
The only reason I'm using them is that they have a unit,which are few. I can move them to the work item table and use a proper join instead.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.