Hello,
I have a report which has 2 tables; app_quality_control and MainJobDetails.
I am trying to show a listing of all job number, whether they have had a quality control issue raised against them or not.
If a job has has quality control issues raised against it, it will increase the number of entries in the report depending on how many times the data has been updated. I have been able to show the Maximum ({app_quality_control.quality_control_id}) as the first set of records under each grouping of job number.
I want to be able to select somehow, only the records which have the maximum value, for those records with quality control issues. I still want to show all the records which have no QAs lodged.
So in the example below, I want to show all the records for job number 526878. For the next job, 527264, I want to only show the records which have the maximum ID, in this case 103514.
JobNo |
Quantity |
Issue? |
quality_control_id |
Result |
526878 |
1,484 |
No QA |
|
|
526878 |
0 |
No QA |
|
|
526878 |
0 |
No QA |
|
|
526878 |
34 |
No QA |
|
|
526878 |
40 |
No QA |
|
|
526878 |
10 |
No QA |
|
|
526878 |
630 |
No QA |
|
|
526878 |
0 |
No QA |
|
|
526878 |
1 |
No QA |
|
|
526878 |
0 |
No QA |
|
|
526878 |
15 |
No QA |
|
|
526878 |
753 |
No QA |
|
|
526878 |
1 |
No QA |
|
|
|
|
|
|
|
|
|
|
|
|
527264 |
61 |
QA raised |
103514 |
Reprint |
527264 |
41 |
QA raised |
103514 |
Reprint |
527264 |
0 |
QA raised |
103514 |
Reprint |
527264 |
1,227 |
QA raised |
103514 |
Reprint |
527264 |
0 |
QA raised |
103514 |
Reprint |
527264 |
0 |
QA raised |
103514 |
Reprint |
527264 |
0 |
QA raised |
103514 |
Reprint |
527264 |
0 |
QA raised |
103514 |
Reprint |
527264 |
15 |
QA raised |
103514 |
Reprint |
527264 |
1,206 |
QA raised |
103514 |
Reprint |
527264 |
1 |
QA raised |
103514 |
Reprint |
527264 |
1 |
QA raised |
103429 |
0 |
527264 |
15 |
QA raised |
103429 |
0 |
527264 |
1,206 |
QA raised |
103429 |
0 |
527264 |
0 |
QA raised |
103429 |
0 |
527264 |
0 |
QA raised |
103429 |
0 |
527264 |
0 |
QA raised |
103429 |
0 |
527264 |
0 |
QA raised |
103429 |
0 |
527264 |
0 |
QA raised |
103429 |
0 |
527264 |
1,227 |
QA raised |
103429 |
0 |
527264 |
61 |
QA raised |
103429 |
0 |
527264 |
41 |
QA raised |
103429 |
0 |