SOLVED

Multi Table (Query) Report

%3CLINGO-SUB%20id%3D%22lingo-sub-1533640%22%20slang%3D%22en-US%22%3EMulti%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1533640%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20an%20Employee%20Certification%20Summary%20report%20that%20uses%20records%20from%205%20different%20data%20tables%2Fqueries.%26nbsp%3B%20The%20records%20from%20separate%20tables%2Fqueries%20are%20as%20follows%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EData%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%23%20of%20Records%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETechnical%20Examination%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%201%3C%2FP%3E%3CP%3EEye%20Exam%20(medical)%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B1%3C%2FP%3E%3CP%3EFormal%20Education%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%201%3C%2FP%3E%3CP%3EPast%20Experience%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B1%3C%2FP%3E%3CP%3ECompleted%20Training%20Classes%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%208%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBecause%20there%20are%208%20Completed%20Training%20Class%20records%20for%20the%20same%20employee%2C%20my%20report%20seems%20to%20repeat%20all%20of%20the%201-record%20data%208%20times%20(creating%20many%20printed%20pages).%26nbsp%3B%20How%20can%20I%20get%20all%20of%20these%20records%20to%20print%20on%20a%20single%20page%20and%20eliminate%20repeats%20of%20both%20labels%20and%20data%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1533640%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1534970%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1534970%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F734078%22%20target%3D%22_blank%22%3E%40ianradcliffe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESet%20the%20Hide%20Duplicates%20property%20of%20the%20relevant%20controls%20to%20Yes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1535806%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535806%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20response%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3B.%26nbsp%3B%20I've%20tried%20this%20-%20it%20hides%20the%20duplicate%20data%2C%20but%20it%20does%20not%20eliminate%20repeats%20of%20the%20%3CU%3Elabels%3C%2FU%3E%20(and%20thus%2C%20creates%20additional%20pages%20of%20report).%26nbsp%3B%20In%20my%20example%2C%20the%201%20table%20that%20has%208%20data%20records%20(since%20those%20records%20are%20all%20different)%20triggers%20the%20production%20of%208%20total%20pages%20of%20report%20-%207%20of%20them%20with%20labels%20that%20include%20no%20data%20except%20the%20single%20record%20from%20the%20table%20with%208%20distinct%20data%20records.%26nbsp%3B%20There%20seems%20not%20to%20be%20away%20to%20put%20the%208%20records%20all%20on%20the%20first%20page%20and%20eliminate%20the%20additional%20pages%20(at%20least%2C%20as%20far%20as%20I%20can%20see%20with%20my%20limited%20knowledge).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20latest%20effort%20had%20me%20embedding%20the%20table%20with%208%20records%20into%20the%20report%20as%20a%20subreport.%26nbsp%3B%20This%20at%20least%20allowed%20me%20to%20get%20the%208%20records%20on%201%20page%2C%20but%20does%20not%20eliminate%20all%20the%20additional%20pages%20with%20labels%20only%20(no%20data%20because%20duplicates%20are%20hidden).%26nbsp%3B%20Thoughts%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1537183%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1537183%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F734078%22%20target%3D%22_blank%22%3E%40ianradcliffe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'd%20either%20remove%20the%20labels%20or%20move%20them%20to%20a%20group%20header%20section.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1542795%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1542795%22%20slang%3D%22en-US%22%3EDo%20the%208%20training%20classes%20have%20a%20predictable%20identifier%2C%20like%20training%2C%20training%2C%20etc%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1543709%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1543709%22%20slang%3D%22en-US%22%3EThey%20are%20logged%20with%20the%20following%20entries%3A%3CBR%20%2F%3E%3CBR%20%2F%3ETraining%20Date%3CBR%20%2F%3ETraining%20Organization%3CBR%20%2F%3ETraining%20Description%3CBR%20%2F%3ETraining%20Hours%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20one%20of%20these%20can%20repeat%20from%20record%20to%20record.%20So%2C%20I%20think%20the%20answer%20to%20the%20question%20is%20no.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1544285%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20Table%20(Query)%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1544285%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F734078%22%20target%3D%22_blank%22%3E%40ianradcliffe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20a%20bit%20more%20detail%20about%20the%20other%20tables%20and%20I'm%20not%20sure%20exactly%20how%20you%20wanted%20the%20training%20formatted%20across%20the%20page%2C%20but%20you%20could%20do%20something%20like%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstead%20of%20joining%20the%20training%20history%20as%20a%20table%20in%20your%20query%20with%20the%20other%20tables%2C%20you%20can%26nbsp%3Bget%20the%20eight%20training%20records%20as%20columns%20if%20you%20use%20the%20TRANSFORM%20command.%20That%20turns%20it%20from%20vertical%20to%20horizontal%20each%20person's%20training%20on%20one%20row%20with%20all%20the%20other%20info.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECreate%20a%20query%20using%20the%20training%20history%20table.%20You%20have%20to%20do%20it%20in%20SQL%2C%20like%20this.%26nbsp%3B%20Save%20this%20query%20and%20just%20put%20it%20in%20your%20query%20replacing%20the%20table.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETRANSFORM%20First(CompletedTrainingClasses.TrainingDate)%20AS%20Training%3CBR%20%2F%3ESELECT%20CompletedTrainingClasses.EmpID%2C%20First(CompletedTrainingClasses.TrainingDesc)%20AS%20FirstOfTrainingDesc%3CBR%20%2F%3EFROM%20CompletedTrainingClasses%3CBR%20%2F%3EGROUP%20BY%20CompletedTrainingClasses.EmpID%3CBR%20%2F%3EPIVOT%20CompletedTrainingClasses.TrainingDesc%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEach%20row%20becomes%20a%20column%20like%20below.%3C%2FP%3E%3CP%3EID%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Exam%26nbsp%3B%20%26nbsp%3BEduc%20PastExpTech%20ExamFirst%26nbsp%3B%20Second%26nbsp%3B%20%26nbsp%3B%20Third%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Fourth%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BFifth%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BSixth%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BSeventh%3C%2FP%3E%3CTABLE%20border%3D%221%22%20cellspacing%3D%220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E1%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3EEye%20Exam%20Done%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3EEduc%20Done%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3Eyes%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3Etech%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E1%2F1%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E1%2F15%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E1%2F31%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E2%2F14%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E3%2F17%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E4%2F12%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E5%2F12%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20face%3D%22Calibri%22%20color%3D%22%23000000%22%3E6%2F1%2F2020%3C%2FFONT%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I am trying to create an Employee Certification Summary report that uses records from 5 different data tables/queries.  The records from separate tables/queries are as follows:

 

Data                                  # of Records

 

Technical Examination                      1

Eye Exam (medical)                           1

Formal Education                              1

Past Experience                                 1

Completed Training Classes              8

 

Because there are 8 Completed Training Class records for the same employee, my report seems to repeat all of the 1-record data 8 times (creating many printed pages).  How can I get all of these records to print on a single page and eliminate repeats of both labels and data?

 

6 Replies
Highlighted

@ianradcliffe 

Set the Hide Duplicates property of the relevant controls to Yes.

Highlighted

Thanks for the response @Hans Vogelaar .  I've tried this - it hides the duplicate data, but it does not eliminate repeats of the labels (and thus, creates additional pages of report).  In my example, the 1 table that has 8 data records (since those records are all different) triggers the production of 8 total pages of report - 7 of them with labels that include no data except the single record from the table with 8 distinct data records.  There seems not to be away to put the 8 records all on the first page and eliminate the additional pages (at least, as far as I can see with my limited knowledge). 

 

My latest effort had me embedding the table with 8 records into the report as a subreport.  This at least allowed me to get the 8 records on 1 page, but does not eliminate all the additional pages with labels only (no data because duplicates are hidden).  Thoughts?

Highlighted

@ianradcliffe 

I'd either remove the labels or move them to a group header section.

Highlighted
Do the 8 training classes have a predictable identifier, like training, training, etc?
Highlighted
They are logged with the following entries:

Training Date
Training Organization
Training Description
Training Hours

Any one of these can repeat from record to record. So, I think the answer to the question is no.
Highlighted
Best Response confirmed by ThereseSolimeno (Microsoft)
Solution

@ianradcliffe 

I need a bit more detail about the other tables and I'm not sure exactly how you wanted the training formatted across the page, but you could do something like this.

 

Instead of joining the training history as a table in your query with the other tables, you can get the eight training records as columns if you use the TRANSFORM command. That turns it from vertical to horizontal each person's training on one row with all the other info.

 

Create a query using the training history table. You have to do it in SQL, like this.  Save this query and just put it in your query replacing the table.

 

TRANSFORM First(CompletedTrainingClasses.TrainingDate) AS Training
SELECT CompletedTrainingClasses.EmpID, First(CompletedTrainingClasses.TrainingDesc) AS FirstOfTrainingDesc
FROM CompletedTrainingClasses
GROUP BY CompletedTrainingClasses.EmpID
PIVOT CompletedTrainingClasses.TrainingDesc;

 

Each row becomes a column like below.

ID      Exam   Educ PastExpTech ExamFirst  Second    Third          Fourth         Fifth         Sixth     Seventh

1Eye Exam DoneEduc Doneyestech1/1/20201/15/20201/31/20202/14/20203/17/20204/12/20205/12/20206/1/2020