How Do I create Individual report Files

Arendvan

Registered User.
Local time
Yesterday, 23:28
Joined
Jun 30, 2009
Messages
10
I have a report which generates say 5 pages of information - Normal printing is not a problem however I want to email them to the individuals. Each page of the report contains differing data and each page needs to be sent to a different person. Is there anyway that I can produce the report as five individual files rather than one report with 5 pages? Any help would be appreciated.
 
It is definitely possible to do. You basically need to run the report multiple times filtering each time.

Check out this:

Sending Emails To A Group, One Person At A Time

Hope it helps...

Thanks Boyd - however can you give me the exact string I need to put for NameOfReport?

i.e. in the code starts as follows:-

Public Function SendReporttoGroup (NameOfReport As String, _ [anything I put in at this point comes up with compile error].

Your help would be appreciated.
 
Re: How Do I create Individual report Files - Again

It is definitely possible to do. You basically need to run the report multiple times filtering each time.

Check out this:

Sending Emails To A Group, One Person At A Time

Hope it helps...

Hi:

I'm still having problems - I have put in the variables to the code you sent me and created the "tblgroupEmails" table but it keeps coming back with "Can't find the name of report I have specified".
I have listed the bit of code below (with some comments beside them) - can you check it over.

Thanks

Public Function SendReportToGroup(NameOfReport As String, _
FieldToGroupOn As String, _
EmailAddrField As String, _
GroupEmailName As String, _
EmailSubject As String, _
EmailFrom As String, _
EmailAddTo As String, _
EmailAddToField As String, _
EmailCC As String, _
EmailCCField As String, _
NameOfAttachment As String, _
DisplayBeforeSending As Boolean)
NameOfReport = "LetterRAE-Sec-Email" (This is the Report Name)
FieldToGroupOn = "Ltype" (Fieldname within record source for Report i.e. Query)
EmailAddrField = "Secmail" (Fieldname within record source for Report i.e. Query)
GroupEmailName = 1 (I've only put one record in there at the moment so assume this is the "record Number")
EmailSubject = "Installation Representation Letter"
EmailFrom = " "
EmailAddTo = " "
EmailAddToField = " "
EmailCC = " "
EmailCCField = " "
NameOfAttachment = "Installation Representation Letter"
DisplayBeforeSending = True
'
On Error GoTo ErrSR
'
'Check to make sure all required parameters exist
If Nz(Len(NameOfReport), 0) = 0 Or Nz(Len(FieldToGroupOn), 0) = 0 Or _
Nz(Len(EmailAddrField), 0) = 0 Or Nz(Len(GroupEmailName), 0) = 0 Or _
Nz(Len(NameOfAttachment), 0) = 0 Then
MsgBox "You must enter all required parameters", vbOKOnly, "Incomplete Data..."
Exit Function
End If
'
 

Users who are viewing this thread

Back
Top Bottom