cclark9589
Registered User.
- Local time
- , 17:38
- Joined
- Sep 22, 2008
- Messages
- 79
Detail won't print if subreport in report footer has no data
This one is driving me nuts!
I have an invoice report, F101Invoices, with 2 subreports. Basic company info is in the report header with client name in page header.
At the top of the detail section I have an array of information related to any specific job such as JobID, FundID, EmpId, AudID, various dates and some other stuff.
The first subreport, F101Invoices_sRpt, which contains line-item detail of the billable charges, including any expenses, is contained in the detail section just below the varied information explained above. The second subreport, F101Invoices_ExpsRpt, is a detailed line-item expense type report and is contained in the report footer. Both subreports are linked to F101Invoices by JobID.
If a job has expenses, the report displays and prints out correctly, no problem. However if a job doesn't have any expenses, nothing prints or displays, other than the header and some static information at the top of the detail section even though there are billable fees. I placed the following code in F101Invoices.Detail OnFormat event:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.F101Invoices_ExpsRpt.Report.HasData = True Then
Me.ReportFooter.Visible = True
Else
Me.ReportFooter.Visible = False
End If
End Sub
This layout technique and the above code are an exact copy of what I use in my time card reports. There are actually 2 subreports in the report footer of time cards, both related to expenses. One subreport is total expense, the second provides information on company paid expenses with a formula calculating reimburseable expenses. If there are no expenses for the pay period, the code above, applicable to the time card, hides the footer so that a blank page doesn't print yet it allows for the detail of all billable hours by job to print or display.
I have JobID (linked fields) in detail section of the invoices. I've tried putting in the page header (this is where the linked field resides in the time card) but this doesn't work either.
Spent the entire weekend getting a couple of issues fixed and working in this beast, a very good portion on this particular issue. Anyone got some ideas? I've got to get to bed before 2 in the morning see as how I have to go to work tomorrow!
This one is driving me nuts!
I have an invoice report, F101Invoices, with 2 subreports. Basic company info is in the report header with client name in page header.
At the top of the detail section I have an array of information related to any specific job such as JobID, FundID, EmpId, AudID, various dates and some other stuff.
The first subreport, F101Invoices_sRpt, which contains line-item detail of the billable charges, including any expenses, is contained in the detail section just below the varied information explained above. The second subreport, F101Invoices_ExpsRpt, is a detailed line-item expense type report and is contained in the report footer. Both subreports are linked to F101Invoices by JobID.
If a job has expenses, the report displays and prints out correctly, no problem. However if a job doesn't have any expenses, nothing prints or displays, other than the header and some static information at the top of the detail section even though there are billable fees. I placed the following code in F101Invoices.Detail OnFormat event:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.F101Invoices_ExpsRpt.Report.HasData = True Then
Me.ReportFooter.Visible = True
Else
Me.ReportFooter.Visible = False
End If
End Sub
This layout technique and the above code are an exact copy of what I use in my time card reports. There are actually 2 subreports in the report footer of time cards, both related to expenses. One subreport is total expense, the second provides information on company paid expenses with a formula calculating reimburseable expenses. If there are no expenses for the pay period, the code above, applicable to the time card, hides the footer so that a blank page doesn't print yet it allows for the detail of all billable hours by job to print or display.
I have JobID (linked fields) in detail section of the invoices. I've tried putting in the page header (this is where the linked field resides in the time card) but this doesn't work either.
Spent the entire weekend getting a couple of issues fixed and working in this beast, a very good portion on this particular issue. Anyone got some ideas? I've got to get to bed before 2 in the morning see as how I have to go to work tomorrow!
Last edited: