nickdawes28
Registered User.
- Local time
- Yesterday, 18:02
- Joined
- Dec 19, 2013
- Messages
- 25
Hey guys,
I have a couple of questions which I'm sure have simple answers- I'm just struggling to work it out myself. I would like to make a report consisting of multiple subreports. The main report is based on a query which has the following fields:
JobNumber, EquipmentID, EquipmentType, InspectionID
The fields are from different tables, the relationships looks like this:
1 Job has Many EquipmentIDs, 1 EquipmentID has Many InspectionIDs.
So by entering the JobNumber as a criteria in the query, I can see which equipment has been assigned to a job and the latest InspectionID for that equipment (use of MAX function to get only the latest InspectionID).
As I said, I would like the report to consist of multiple subreports, and those subreports need to be based on the InspectionID (which is the primary key in tblInspectionLog). This is simple, however I'm struggling to work out the following 2 steps...
1) Let's say for example my query returns the following:
Job1 Rope1 Rope 23
Job1 Helmet1 Helmet 34
I need 2 subreports, both based on the InspectionID but each subreport also needs to be based on the EquipmentType. So subrptRopes will only show data where the EquipmentType is "Ropes" and subrptHelmets will only show data where the EquipmentType is "Helmets". There are more EquipmentTypes, which will also need subreports. At the moment linking by InspectionID alone I see all subreports display for each record in the query, regardless of EquipmentType. I would like the subreports to display only for records where their EquipmentType fields match, and only display data for the InspectionID returned from the query.
2) How would I make sure a subreport remains invisible if it has no data to display? For example if no ropes are assigned to a job, I do not want to see subrptRopes appear. I have googled and searched the forum and have experimented with the On No Data event, but cannot seem to make this work for me.
Hope the above made sense, happy to provide more details.
Thanks,
Nick
I have a couple of questions which I'm sure have simple answers- I'm just struggling to work it out myself. I would like to make a report consisting of multiple subreports. The main report is based on a query which has the following fields:
JobNumber, EquipmentID, EquipmentType, InspectionID
The fields are from different tables, the relationships looks like this:
1 Job has Many EquipmentIDs, 1 EquipmentID has Many InspectionIDs.
So by entering the JobNumber as a criteria in the query, I can see which equipment has been assigned to a job and the latest InspectionID for that equipment (use of MAX function to get only the latest InspectionID).
As I said, I would like the report to consist of multiple subreports, and those subreports need to be based on the InspectionID (which is the primary key in tblInspectionLog). This is simple, however I'm struggling to work out the following 2 steps...
1) Let's say for example my query returns the following:
Job1 Rope1 Rope 23
Job1 Helmet1 Helmet 34
I need 2 subreports, both based on the InspectionID but each subreport also needs to be based on the EquipmentType. So subrptRopes will only show data where the EquipmentType is "Ropes" and subrptHelmets will only show data where the EquipmentType is "Helmets". There are more EquipmentTypes, which will also need subreports. At the moment linking by InspectionID alone I see all subreports display for each record in the query, regardless of EquipmentType. I would like the subreports to display only for records where their EquipmentType fields match, and only display data for the InspectionID returned from the query.
2) How would I make sure a subreport remains invisible if it has no data to display? For example if no ropes are assigned to a job, I do not want to see subrptRopes appear. I have googled and searched the forum and have experimented with the On No Data event, but cannot seem to make this work for me.
Hope the above made sense, happy to provide more details.
Thanks,
Nick