Click to See Complete Forum and Search --> : Displaying distinct record


virlinz
October 14th, 2005, 11:05 PM
Hi
I have two tables, linked together in my report. Report_Master is the master table and Report_Details is the detail table. The following is the SQL Query (I right click on Database Field in the Field Explorer and select Show SQL Query)
SELECT `Report_Master`.`Rpt_No`, `Report_Master`.`Rpt_Date`, `Report_Master`.`Rpt_Supervisor`,
`Report_Details`.`Rpt_Description`, `Report_Details`.`Rpt_Note`
FROM `Report_Details` `Report_Details`
INNER JOIN `Report_Master` `Report_Master`
ON `Report_Details`.`Rpt_No`=`Report_Master`.`Rpt_No`
I'd like to display all this like a normal report where the report will start with the name of the person writing the report, the date and followed by the description of the report. I dont find any problem when generating a report with only one record of description (from the Report_Details) because it will look just like what I wanted. When there are more than one description of a certain date in the details table, say three records, whatever in the master table will be displayed 3 times. How to correct this problem?
Thank you in advance

boumerlin
October 15th, 2005, 12:23 PM
You need to add a grouping to your report from one of the fields in the master table.

Linda

virlinz
October 16th, 2005, 11:02 PM
I did.
I right clicked on Group Name Field and selected Report_Master.Rpt_No as the field to group but it shows me the same output. Where did i do wrong?

boumerlin
October 17th, 2005, 09:50 AM
Did you put the field(s) you don't want repeated in the group header line and remove them from the detail line in the report?