In the table I have a column which flags a row as a special row. When the report is being generated as a preview, where do I add the code display a line for the special rows? Do I put it in the template, if so, where, or can I create a function when I generate the report code?
Sorry if I did not define the problem better earlier.
You would use my code in the On Format event of the detail section. This assumes that you have a bound control in your detail section that you can use to evaluate.
I put the code in the Format event of the detail section of the report template but nothing happens when I run the job. I put in a debug.print statement but nothing was printed.
Is the format event triggered if the report is used as a template?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Trim(Me.txtSortGroup) = "9" Then
Me.Line (0, Me.Detail.Height)-Step(Me.Width, 0)
End If
Debug.Print "Report Detail"
End Sub
Interestingly I created the a control called txtSortGroup in the report. Another control is being created in the VBA code which is also called txtSortGroup. When I run the job I do not get an error of a duplicate control name being created. This leads me to believe that the controls and code attaced to them are not used when using the report as a template for the CreateReport() function.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.