How to print multiple lines in the report footer?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CD Tom
    Contributor
    • Feb 2009
    • 495

    #1

    How to print multiple lines in the report footer?

    I have a report that I have two sets of data. I want to print the main data in the detail section of the report, when the main data is printed I want to print the last set of data in the report footer. I have set the reportfooter_Pr int to loop through the data and collect what I want to print. But with more than one line to print doing it this way I only get the last data line to print. Is there a way to force a line to print so after collecting the data to print I can make it print that line then go on to the next line.
    Code:
        
        Dim db As Database
        Dim vrec As DAO.Recordset
        Set db = CurrentDb()
        strsql = "Select * from ReferalsCredits where textfield1 is not null"
        Set vrec = db.OpenRecordset(strsql)
        Do While Not vrec.EOF
            VNonMbr = vrec("textfield1")
            VtotCr = vrec("RefCount")
            vrec.MoveNext
        Loop
    I hope this makes sense, if here is a better way let me know.
    Thanks for any help.
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    Yes, there is a MUCH better way.

    Create a report containing the data you need for the footer (I.e. same fields as you currently have, and set the new report Recordsource to the SQL string you allready have). Then you insert that report into your main report footer.

    Comment

    Working...